Now on revision 112550. ------------------------------------------------------------ revno: 112550 fixes bug: http://debbugs.gnu.org/14350 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-05-11 14:20:10 +0800 message: * progmodes/octave.el (octave-indent-comment): New function. (octave-mode): Use it in smie-indent-functions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-11 03:50:34 +0000 +++ lisp/ChangeLog 2013-05-11 06:20:10 +0000 @@ -3,6 +3,8 @@ * progmodes/octave.el (octave-beginning-of-line) (octave-end-of-line): Check before using up-list because it jumps out of more syntactic contructs since moving to smie. + (octave-indent-comment): New function. + (octave-mode): Use it in smie-indent-functions. (Bug#14350) 2013-05-11 Glenn Morris === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-11 03:50:34 +0000 +++ lisp/progmodes/octave.el 2013-05-11 06:20:10 +0000 @@ -414,6 +414,13 @@ ;; (if (smie-parent-p "switch") 4) 0)))) +(defun octave-indent-comment () + "A function for `smie-indent-functions' (which see)." + (save-excursion + (back-to-indentation) + (when (and (looking-at-p "\\s<") (not (looking-at-p "\\s<\\s<"))) + (comment-choose-indent)))) + (defvar octave-font-lock-keywords (list @@ -488,6 +495,7 @@ :forward-token #'octave-smie-forward-token :backward-token #'octave-smie-backward-token) (setq-local smie-indent-basic 'octave-block-offset) + (add-hook 'smie-indent-functions #'octave-indent-comment nil t) (setq-local smie-blink-matching-triggers (cons ?\; smie-blink-matching-triggers)) ------------------------------------------------------------ revno: 112549 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-05-11 11:50:34 +0800 message: * progmodes/octave.el (octave-beginning-of-line) (octave-end-of-line): Check before using up-list because it jumps out of more syntactic contructs since moving to smie. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-11 02:27:28 +0000 +++ lisp/ChangeLog 2013-05-11 03:50:34 +0000 @@ -1,3 +1,9 @@ +2013-05-11 Leo Liu + + * progmodes/octave.el (octave-beginning-of-line) + (octave-end-of-line): Check before using up-list because it jumps + out of more syntactic contructs since moving to smie. + 2013-05-11 Glenn Morris * faces.el (internal-face-x-get-resource): @@ -89,7 +95,7 @@ 2013-05-09 Leo Liu * progmodes/octave.el (inferior-octave-completion-at-point): - Restore the broken file completion. (Bug#14300) + Restore file completion. (Bug#14300) (inferior-octave-startup): Fix incorrect highlighting for the first prompt. === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-10 06:26:42 +0000 +++ lisp/progmodes/octave.el 2013-05-11 03:50:34 +0000 @@ -1107,45 +1107,43 @@ If on an empty or comment line, go to the beginning of that line. Otherwise, move backward to the beginning of the first Octave code line which is not inside a continuation statement, i.e., which does not -follow a code line ending in `...' or `\\', or is inside an open +follow a code line ending with `...' or is inside an open parenthesis list." (interactive) (beginning-of-line) - (if (not (looking-at "\\s-*\\($\\|\\s<\\)")) - (while (or (condition-case nil - (progn - (up-list -1) - (beginning-of-line) - t) - (error nil)) - (and (or (looking-at "\\s-*\\($\\|\\s<\\)") - (save-excursion - (if (zerop (octave-previous-code-line)) - (looking-at octave-continuation-regexp)))) - (zerop (forward-line -1))))))) + (unless (looking-at "\\s-*\\($\\|\\s<\\)") + (while (or (when (cadr (syntax-ppss)) + (goto-char (cadr (syntax-ppss))) + (beginning-of-line) + t) + (and (or (looking-at "\\s-*\\($\\|\\s<\\)") + (save-excursion + (if (zerop (octave-previous-code-line)) + (looking-at octave-continuation-regexp)))) + (zerop (forward-line -1))))))) (defun octave-end-of-line () "Move point to end of current Octave line. If on an empty or comment line, go to the end of that line. Otherwise, move forward to the end of the first Octave code line which -does not end in `...' or `\\' or is inside an open parenthesis list." +does not end with `...' or is inside an open parenthesis list." (interactive) (end-of-line) - (if (save-excursion - (beginning-of-line) - (looking-at "\\s-*\\($\\|\\s<\\)")) - () - (while (or (condition-case nil - (progn - (up-list 1) - (end-of-line) - t) - (error nil)) - (and (save-excursion - (beginning-of-line) - (or (looking-at "\\s-*\\($\\|\\s<\\)") - (looking-at octave-continuation-regexp))) - (zerop (forward-line 1))))) + (unless (save-excursion + (beginning-of-line) + (looking-at "\\s-*\\($\\|\\s<\\)")) + (while (or (when (cadr (syntax-ppss)) + (condition-case nil + (progn + (up-list 1) + (end-of-line) + t) + (error nil))) + (and (save-excursion + (beginning-of-line) + (or (looking-at "\\s-*\\($\\|\\s<\\)") + (looking-at octave-continuation-regexp))) + (zerop (forward-line 1))))) (end-of-line))) (defun octave-mark-block () ------------------------------------------------------------ revno: 112548 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-10 19:29:57 -0700 message: More cus-test.el tweaks * admin/cus-test.el (cus-test-libs-noloads): Add a few more files. (cus-test-load-libs, cus-test-opts): Add option to load more/all Lisp files. (cus-test-get-lisp-files): Ignore .*.el files. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-05-10 07:31:34 +0000 +++ admin/ChangeLog 2013-05-11 02:29:57 +0000 @@ -1,3 +1,10 @@ +2013-05-11 Glenn Morris + + * cus-test.el (cus-test-libs-noloads): Add a few more files. + (cus-test-load-libs, cus-test-opts): + Add option to load more/all Lisp files. + (cus-test-get-lisp-files): Ignore .*.el files. + 2013-05-10 Glenn Morris * cus-test.el (cus-test-libs-noloads): Add some files. === modified file 'admin/cus-test.el' --- admin/cus-test.el 2013-05-10 07:31:34 +0000 +++ admin/cus-test.el 2013-05-11 02:29:57 +0000 @@ -99,9 +99,14 @@ (defvar cus-test-skip-list nil "List of variables to disregard by `cus-test-apropos'.") -;; Loading dunnet in batch mode leads to a Dead end. -(defvar cus-test-libs-noloads '("play/dunnet.el" "emulation/edt-mapper.el" - "loadup.el" "mail/blessmail.el") +(defvar cus-test-libs-noloads + ;; Loading dunnet in batch mode leads to a Dead end. + ;; blessmail writes a file. + ;; characters cannot be loaded twice ("Category `a' is already defined"). + '("play/dunnet.el" "emulation/edt-mapper.el" + "loadup.el" "mail/blessmail.el" "international/characters.el" + "cedet/ede/loaddefs.el" "cedet/semantic/loaddefs.el" + "net/tramp-loaddefs.el") "List of files not to load by `cus-test-load-libs'. Names should be as they appear in loaddefs.el.") @@ -277,9 +282,11 @@ (run-hooks 'cus-test-after-load-libs-hook))) ;; This is just cus-test-libs, but loading in the current Emacs process. -(defun cus-test-load-libs () +(defun cus-test-load-libs (&optional more) "Load the libraries with autoloads. -Don't load libraries in `cus-test-libs-noloads'." +Don't load libraries in `cus-test-libs-noloads'. +If optional argument MORE is \"defcustom\", load all files with defcustoms. +If it is \"all\", load all Lisp files." (interactive) (cus-test-load-1 (let ((lispdir (file-name-directory (locate-library "loaddefs")))) @@ -292,7 +299,9 @@ (error (push (cons file alpha) cus-test-libs-errors) (message "Error for %s: %s" file alpha)))) - (cus-test-get-autoload-deps))))) + (if more + (cus-test-get-lisp-files (equal more "all")) + (cus-test-get-autoload-deps)))))) (defun cus-test-get-autoload-deps () "Return the list of files with autoloads." @@ -313,7 +322,7 @@ ;; Hack to remove leading "./". (mapcar (lambda (e) (substring e 2)) (apply 'process-lines find-program - "-name" "*.el" + "-name" "[^.]*.el" ; ignore .dir-locals.el (unless all (list "-exec" grep-program "-l" "^[ \t]*(defcustom" "{}" "+")))) @@ -326,16 +335,21 @@ ;;; The routines for batch mode: -(defun cus-test-opts () +(defun cus-test-opts (&optional all) "Test custom options. This function is suitable for batch mode. E.g., invoke src/emacs -batch -l admin/cus-test.el -f cus-test-opts -in the Emacs source directory." +in the Emacs source directory. +Normally only tests options belonging to files in loaddefs.el. +If optional argument ALL is non-nil, test all files with defcustoms." (interactive) + (and noninteractive + command-line-args-left + (setq all (pop command-line-args-left))) (message "Running %s" 'cus-test-load-libs) - (cus-test-load-libs) + (cus-test-load-libs (if all "defcustom")) (message "Running %s" 'cus-test-load-custom-loads) (cus-test-load-custom-loads) (message "Running %s" 'cus-test-apropos) ------------------------------------------------------------ revno: 112547 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-10 19:27:28 -0700 message: Fix some declarations * lisp/faces.el (internal-face-x-get-resource): * lisp/frame.el (ns-display-monitor-attributes-list): * lisp/calc/calc-aent.el (math-to-radians-2): * lisp/cedet/ede/locate.el (cedet-cscope-version-check) (cedet-cscope-support-for-directory): * lisp/cedet/semantic/grammar.el (semantic-grammar-wy--install-parser): * lisp/emacs-lisp/package.el (tar-header-name, tar-header-link-type): Fix declarations. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-11 02:25:11 +0000 +++ lisp/ChangeLog 2013-05-11 02:27:28 +0000 @@ -1,5 +1,11 @@ 2013-05-11 Glenn Morris + * faces.el (internal-face-x-get-resource): + * frame.el (ns-display-monitor-attributes-list): + * calc/calc-aent.el (math-to-radians-2): Fix declarations. + + * emacs-lisp/package.el (tar-header-name, tar-header-link-type): + * calc/calc-menu.el: Make it loadable in isolation. * net/eudcb-bbdb.el: Make it loadable without bbdb. === modified file 'lisp/calc/calc-aent.el' --- lisp/calc/calc-aent.el 2013-01-01 09:11:05 +0000 +++ lisp/calc/calc-aent.el 2013-05-11 02:27:28 +0000 @@ -42,7 +42,7 @@ (declare-function math-simplify "calc-alg" (top-expr)) (declare-function math-known-matrixp "calc-arith" (a)) (declare-function math-parse-fortran-subscr "calc-lang" (sym args)) -(declare-function math-to-radians-2 "calc-math" (a)) +(declare-function math-to-radians-2 "calc-math" (a &optional force-symbolic)) (declare-function math-read-string "calc-ext" ()) (declare-function math-read-brackets "calc-vec" (space-sep math-rb-close)) (declare-function math-read-angle-brackets "calc-forms" ()) === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-05-11 02:21:29 +0000 +++ lisp/cedet/ChangeLog 2013-05-11 02:27:28 +0000 @@ -1,5 +1,10 @@ 2013-05-11 Glenn Morris + * ede/locate.el (cedet-cscope-version-check) + (cedet-cscope-support-for-directory): + * semantic/grammar.el (semantic-grammar-wy--install-parser): + Fix declarations. + * ede/project-am.el (project-am-compile-project-command): Fix :type. 2013-05-09 Glenn Morris === modified file 'lisp/cedet/ede/locate.el' --- lisp/cedet/ede/locate.el 2013-03-21 22:11:03 +0000 +++ lisp/cedet/ede/locate.el 2013-05-11 02:27:28 +0000 @@ -310,8 +310,8 @@ ;;; CSCOPE ;; -(declare-function cedet-cscope-version-check "cedet-scope") -(declare-function cedet-cscope-support-for-directory "cedet-scope") +(declare-function cedet-cscope-version-check "cedet-cscope") +(declare-function cedet-cscope-support-for-directory "cedet-cscope") (declare-function cedet-cscope-expand-filename "cedet-cscope") (declare-function cedet-cscope-create/update-database "cedet-cscope") === modified file 'lisp/cedet/semantic/grammar.el' --- lisp/cedet/semantic/grammar.el 2013-03-21 22:11:03 +0000 +++ lisp/cedet/semantic/grammar.el 2013-05-11 02:27:28 +0000 @@ -48,11 +48,7 @@ (require 'semantic/find) (require 'semantic/db)) -(declare-function semantic-grammar-wy--install-parser - "semantic/gram-wy-fallback") - -(declare-function semantic-grammar-wy--install-parser - "semantic/gram-wy-fallback") +(declare-function semantic-grammar-wy--install-parser "semantic/grammar-wy") ;;;; === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-04-27 13:32:53 +0000 +++ lisp/emacs-lisp/package.el 2013-05-11 02:27:28 +0000 @@ -613,8 +613,8 @@ (defvar tar-parse-info) (declare-function tar-untar-buffer "tar-mode" ()) -(declare-function tar-header-name "tar-mode" (tar-header)) -(declare-function tar-header-link-type "tar-mode" (tar-header)) +(declare-function tar-header-name "tar-mode" (tar-header) t) +(declare-function tar-header-link-type "tar-mode" (tar-header) t) (defun package-untar-buffer (dir) "Untar the current buffer. === modified file 'lisp/faces.el' --- lisp/faces.el 2013-05-08 15:06:28 +0000 +++ lisp/faces.el 2013-05-11 02:27:28 +0000 @@ -297,7 +297,7 @@ (declare-function internal-face-x-get-resource "xfaces.c" - (resource class frame)) + (resource class &optional frame)) (declare-function internal-set-lisp-face-attribute-from-resource "xfaces.c" (face attr value &optional frame)) === modified file 'lisp/frame.el' --- lisp/frame.el 2013-05-09 15:17:38 +0000 +++ lisp/frame.el 2013-05-11 02:27:28 +0000 @@ -1495,7 +1495,7 @@ (declare-function x-display-monitor-attributes-list "xfns.c" (&optional terminal)) -(declare-function ns-display-monitor-attributes-list "nsfns.c" +(declare-function ns-display-monitor-attributes-list "nsfns.m" (&optional terminal)) (defun display-monitor-attributes-list (&optional display) ------------------------------------------------------------ revno: 112546 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-10 19:25:11 -0700 message: Make a few libraries loadable in isolation * lisp/calc/calc-menu.el: Make it loadable in isolation. * lisp/gnus/gnus-vm.el: Make it loadable without VM. (gnus-vm-make-folder, gnus-summary-save-in-vm): Require 'vm. (vm-forward-message, vm-reply, vm-mail): Remove unused autoloads. * lisp/net/eudcb-bbdb.el: Make it loadable without bbdb. (eudc-bbdb-filter-non-matching-record, eudc-bbdb-extract-phones) (eudc-bbdb-extract-addresses, eudc-bbdb-format-record-as-result) (eudc-bbdb-query-internal): Require 'bbdb. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-11 02:21:29 +0000 +++ lisp/ChangeLog 2013-05-11 02:25:11 +0000 @@ -1,5 +1,12 @@ 2013-05-11 Glenn Morris + * calc/calc-menu.el: Make it loadable in isolation. + + * net/eudcb-bbdb.el: Make it loadable without bbdb. + (eudc-bbdb-filter-non-matching-record, eudc-bbdb-extract-phones) + (eudc-bbdb-extract-addresses, eudc-bbdb-format-record-as-result) + (eudc-bbdb-query-internal): Require 'bbdb. + * lpr.el (lpr-headers-switches): * emacs-lisp/testcover.el (testcover-compose-functions): Fix :type. === modified file 'lisp/calc/calc-menu.el' --- lisp/calc/calc-menu.el 2013-01-01 09:11:05 +0000 +++ lisp/calc/calc-menu.el 2013-05-11 02:25:11 +0000 @@ -1634,7 +1634,9 @@ (Info-goto-node "Help Commands"))]) "Menu for Calc's help functions.") -(defvar calc-mode-map) +;; Needed to make this file loadable in isolation. +;; Another option would be to use calc-load-hook. +(require 'calc) (easy-menu-define calc-menu === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-09 06:46:51 +0000 +++ lisp/gnus/ChangeLog 2013-05-11 02:25:11 +0000 @@ -1,3 +1,9 @@ +2013-05-11 Glenn Morris + + * gnus-vm.el: Make it loadable without VM. + (gnus-vm-make-folder, gnus-summary-save-in-vm): Require 'vm. + (vm-forward-message, vm-reply, vm-mail): Remove unused autoloads. + 2013-05-09 Glenn Morris * mml1991.el: Make it loadable. (Bug#13456) === modified file 'lisp/gnus/gnus-vm.el' --- lisp/gnus/gnus-vm.el 2013-01-01 09:11:05 +0000 +++ lisp/gnus/gnus-vm.el 2013-05-11 02:25:11 +0000 @@ -35,12 +35,10 @@ (require 'gnus-msg) (eval-when-compile - (require 'cl) - (autoload 'vm-mode "vm") - (autoload 'vm-save-message "vm") - (autoload 'vm-forward-message "vm") - (autoload 'vm-reply "vm") - (autoload 'vm-mail "vm")) + (require 'cl)) + +(autoload 'vm-mode "vm") +(autoload 'vm-save-message "vm") (defvar gnus-vm-inhibit-window-system nil "Inhibit loading `win-vm' if using a window-system. @@ -51,10 +49,8 @@ (when window-system (require 'win-vm)))) -(when (not (featurep 'vm)) - (load "vm")) - (defun gnus-vm-make-folder (&optional buffer) + (require 'vm) (let ((article (or buffer (current-buffer))) (tmp-folder (generate-new-buffer " *tmp-folder*")) (start (point-min)) @@ -87,6 +83,7 @@ (defun gnus-summary-save-in-vm (&optional folder) (interactive) + (require 'vm) (setq folder (gnus-read-save-file-name "Save %s in VM folder:" folder === modified file 'lisp/net/eudcb-bbdb.el' --- lisp/net/eudcb-bbdb.el 2013-03-05 17:13:01 +0000 +++ lisp/net/eudcb-bbdb.el 2013-05-11 02:25:11 +0000 @@ -29,10 +29,10 @@ ;;; Code: (require 'eudc) -(if (not (featurep 'bbdb)) - (load-library "bbdb")) -(if (not (featurep 'bbdb-com)) - (load-library "bbdb-com")) + +;; Make it loadable on systems without bbdb. +(require 'bbdb nil t) +(require 'bbdb-com nil t) ;;{{{ Internal cooking @@ -71,6 +71,7 @@ (defun eudc-bbdb-filter-non-matching-record (record) "Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise." + (require 'bbdb) (catch 'unmatch (progn (dolist (condition eudc-bbdb-current-query) @@ -112,6 +113,7 @@ (&optional dont-check-disk already-in-db-buffer)) (defun eudc-bbdb-extract-phones (record) + (require 'bbdb) (mapcar (function (lambda (phone) (if eudc-bbdb-use-locations-as-attribute-names @@ -123,6 +125,7 @@ (bbdb-record-phones record))) (defun eudc-bbdb-extract-addresses (record) + (require 'bbdb) (let (s c val) (mapcar (lambda (address) (setq c (bbdb-address-streets address)) @@ -146,6 +149,7 @@ (defun eudc-bbdb-format-record-as-result (record) "Format the BBDB RECORD as a EUDC query result record. The record is filtered according to `eudc-bbdb-current-return-attributes'" + (require 'bbdb) (let ((attrs (or eudc-bbdb-current-return-attributes '(firstname lastname aka company phones addresses net notes))) attr @@ -188,7 +192,7 @@ BBDB attribute names. RETURN-ATTRS is a list of attributes to return, defaulting to `eudc-default-return-attributes'." - + (require 'bbdb) (let ((eudc-bbdb-current-query query) (eudc-bbdb-current-return-attributes return-attrs) (query-attrs (eudc-bbdb-format-query query)) ------------------------------------------------------------ revno: 112545 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-10 19:21:29 -0700 message: More custom :type fixes * lisp/lpr.el (lpr-headers-switches): * lisp/emacs-lisp/testcover.el (testcover-compose-functions): * lisp/cedet/ede/project-am.el (project-am-compile-project-command): Fix :type. * lisp/progmodes/sql.el (sql-login-params): Fix and improve :type. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-11 02:17:45 +0000 +++ lisp/ChangeLog 2013-05-11 02:21:29 +0000 @@ -1,5 +1,10 @@ 2013-05-11 Glenn Morris + * lpr.el (lpr-headers-switches): + * emacs-lisp/testcover.el (testcover-compose-functions): Fix :type. + + * progmodes/sql.el (sql-login-params): Fix and improve :type. + * emulation/edt-mapper.el: In batch mode, error rather than hang. * term.el (term-set-escape-char): Make it idempotent. === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-05-09 01:40:20 +0000 +++ lisp/cedet/ChangeLog 2013-05-11 02:21:29 +0000 @@ -1,3 +1,7 @@ +2013-05-11 Glenn Morris + + * ede/project-am.el (project-am-compile-project-command): Fix :type. + 2013-05-09 Glenn Morris * semantic/db-find.el (semanticdb-find-throttle-custom-list): === modified file 'lisp/cedet/ede/project-am.el' --- lisp/cedet/ede/project-am.el 2013-01-01 09:11:05 +0000 +++ lisp/cedet/ede/project-am.el 2013-05-11 02:21:29 +0000 @@ -55,7 +55,7 @@ (defcustom project-am-compile-project-command nil "*Default command used to compile a project." :group 'project-am - :type 'string) + :type '(choice const nil) string) (defcustom project-am-compile-target-command (concat ede-make-command " -k %s") "*Default command used to compile a project." === modified file 'lisp/emacs-lisp/testcover.el' --- lisp/emacs-lisp/testcover.el 2013-05-09 01:40:20 +0000 +++ lisp/emacs-lisp/testcover.el 2013-05-11 02:21:29 +0000 @@ -118,7 +118,7 @@ brown splotch is shown for these. This list is quite incomplete! Most side-effect-free functions should be here." :group 'testcover - :type 'hook) + :type '(repeat symbol)) (defcustom testcover-progn-functions '(define-key fset function goto-char mapc overlay-put progn === modified file 'lisp/lpr.el' --- lisp/lpr.el 2013-01-01 09:11:05 +0000 +++ lisp/lpr.el 2013-05-11 02:21:29 +0000 @@ -125,7 +125,9 @@ "List of strings of options to request page headings in the printer program. If nil, we run `lpr-page-header-program' to make page headings and print the result." - :type '(repeat (string :tag "Argument")) + :type '(choice (const nil) + (string :tag "Single argument") + (repeat :tag "Multiple arguments" (string :tag "Argument"))) :group 'lpr) (defcustom print-region-function nil === modified file 'lisp/progmodes/sql.el' --- lisp/progmodes/sql.el 2013-03-11 04:09:37 +0000 +++ lisp/progmodes/sql.el 2013-05-11 02:21:29 +0000 @@ -285,36 +285,49 @@ (define-widget 'sql-login-params 'lazy "Widget definition of the login parameters list" - ;; FIXME: does not implement :default property for the user, - ;; database and server options. Anybody have some guidance on how to - ;; do this. :tag "Login Parameters" - :type '(repeat (choice - (const user) - (const password) - (choice :tag "server" - (const server) - (list :tag "file" - (const :format "" server) - (const :format "" :file) - regexp) - (list :tag "completion" - (const :format "" server) - (const :format "" :completion) - (restricted-sexp - :match-alternatives (listp stringp)))) - (choice :tag "database" - (const database) - (list :tag "file" - (const :format "" database) - (const :format "" :file) - regexp) - (list :tag "completion" - (const :format "" database) - (const :format "" :completion) - (restricted-sexp - :match-alternatives (listp stringp)))) - (const port)))) + :type '(set :tag "Login Parameters" + (choice :tag "user" + :value user + (const user) + (list :tag "Specify a default" + (const user) + (list :tag "Default" + :inline t (const :default) string))) + (const password) + (choice :tag "server" + :value server + (const server) + (list :tag "Specify a default" + (const server) + (list :tag "Default" + :inline t (const :default) string)) + (list :tag "file" + (const :format "" server) + (const :format "" :file) + regexp) + (list :tag "completion" + (const :format "" server) + (const :format "" :completion) + (restricted-sexp + :match-alternatives (listp stringp)))) + (choice :tag "database" + :value database + (const database) + (list :tag "Specify a default" + (const database) + (list :tag "Default" + :inline t (const :default) string)) + (list :tag "file" + (const :format "" database) + (const :format "" :file) + regexp) + (list :tag "completion" + (const :format "" database) + (const :format "" :completion) + (restricted-sexp + :match-alternatives (listp stringp)))) + (const port))) ;; SQL Product support ------------------------------------------------------------ revno: 112544 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-10 19:17:45 -0700 message: * lisp/emulation/edt-mapper.el: In batch mode, error rather than hang. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-11 02:15:46 +0000 +++ lisp/ChangeLog 2013-05-11 02:17:45 +0000 @@ -1,5 +1,7 @@ 2013-05-11 Glenn Morris + * emulation/edt-mapper.el: In batch mode, error rather than hang. + * term.el (term-set-escape-char): Make it idempotent. 2013-05-10 Leo Liu === modified file 'lisp/emulation/edt-mapper.el' --- lisp/emulation/edt-mapper.el 2013-01-01 09:11:05 +0000 +++ lisp/emulation/edt-mapper.el 2013-05-11 02:17:45 +0000 @@ -96,6 +96,10 @@ ;;; Code: +;; Otherwise it just hangs. This seems preferable. +(if noninteractive + (error "edt-mapper cannot be loaded in batch mode")) + ;;; ;;; Decide Emacs Variant, GNU Emacs or XEmacs (aka Lucid Emacs). ;;; Determine Window System, and X Server Vendor (if appropriate). ------------------------------------------------------------ revno: 112543 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-10 19:15:46 -0700 message: * lisp/term.el (term-set-escape-char): Make it idempotent. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-10 06:26:42 +0000 +++ lisp/ChangeLog 2013-05-11 02:15:46 +0000 @@ -1,3 +1,7 @@ +2013-05-11 Glenn Morris + + * term.el (term-set-escape-char): Make it idempotent. + 2013-05-10 Leo Liu * progmodes/octave.el (inferior-octave-completion-table): No === modified file 'lisp/term.el' --- lisp/term.el 2013-01-04 19:22:37 +0000 +++ lisp/term.el 2013-05-11 02:15:46 +0000 @@ -953,7 +953,7 @@ (when term-escape-char ;; Undo previous term-set-escape-char. (define-key term-raw-map term-escape-char 'term-send-raw)) - (setq term-escape-char (vector key)) + (setq term-escape-char (if (vectorp key) key (vector key))) (define-key term-raw-map term-escape-char term-raw-escape-map) ;; FIXME: If we later call term-set-escape-char again with another key, ;; we should undo this binding. ------------------------------------------------------------ revno: 112542 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-10 06:21:19 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2013-02-20 05:18:20 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2013-05-10 10:21:19 +0000 @@ -267,7 +267,7 @@ ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) -;;;;;; "cl-macs" "cl-macs.el" "8a90c81a400a2846e7b4c3da07626d94") +;;;;;; "cl-macs" "cl-macs.el" "b839ad3781c4f2f849df0639b4eba166") ;;; Generated autoloads from cl-macs.el (autoload 'cl--compiler-macro-list* "cl-macs" "\ @@ -417,17 +417,35 @@ (autoload 'cl-loop "cl-macs" "\ The Common Lisp `loop' macro. -Valid clauses are: - for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM, - for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR, - for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND, - always COND, never COND, thereis COND, collect EXPR into VAR, - append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR, - count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR, - if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR, - finally return EXPR, named NAME. +Valid clauses include: + For clauses: + for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 by EXPR3 + for VAR = EXPR1 then EXPR2 + for VAR in/on/in-ref LIST by FUNC + for VAR across/across-ref ARRAY + for VAR being: + the elements of/of-ref SEQUENCE [using (index VAR2)] + the symbols [of OBARRAY] + the hash-keys/hash-values of HASH-TABLE [using (hash-values/hash-keys V2)] + the key-codes/key-bindings/key-seqs of KEYMAP [using (key-bindings VAR2)] + the overlays/intervals [of BUFFER] [from POS1] [to POS2] + the frames/buffers + the windows [of FRAME] + Iteration clauses: + repeat INTEGER + while/until/always/never/thereis CONDITION + Accumulation clauses: + collect/append/nconc/concat/vconcat/count/sum/maximize/minimize FORM + [into VAR] + Miscellaneous clauses: + with VAR = INIT + if/when/unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...] + named NAME + initially/finally [do] EXPRS... + do EXPRS... + [finally] return EXPR + +For more details, see Info node `(cl)Loop Facility'. \(fn CLAUSE...)" nil t) ------------------------------------------------------------ revno: 112541 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-10 06:17:36 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-05-08 10:17:38 +0000 +++ autogen/configure 2013-05-10 10:17:36 +0000 @@ -27715,6 +27715,9 @@ ## each); under Cocoa 31 commands are required. if test "$HAVE_NS" = "yes"; then libs_nsgui="-framework AppKit" + if test "$NS_IMPL_COCOA" = "yes"; then + libs_nsgui="$libs_nsgui -framework IOKit" + fi headerpad_extra=6C8 else libs_nsgui= ------------------------------------------------------------ revno: 112540 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-05-10 00:31:34 -0700 message: Add option for cus-test.el to load all Lisp files * admin/cus-test.el (cus-test-libs-noloads): Add some files. (cus-test-get-lisp-files): New function. (cus-test-libs): Add option to load more/all Lisp files. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-05-09 06:09:39 +0000 +++ admin/ChangeLog 2013-05-10 07:31:34 +0000 @@ -1,3 +1,9 @@ +2013-05-10 Glenn Morris + + * cus-test.el (cus-test-libs-noloads): Add some files. + (cus-test-get-lisp-files): New function. + (cus-test-libs): Add option to load more/all Lisp files. + 2013-05-09 Glenn Morris * cus-test.el: No need to provide bbdb, bbdb-com any more. === modified file 'admin/cus-test.el' --- admin/cus-test.el 2013-05-09 06:09:39 +0000 +++ admin/cus-test.el 2013-05-10 07:31:34 +0000 @@ -100,7 +100,8 @@ "List of variables to disregard by `cus-test-apropos'.") ;; Loading dunnet in batch mode leads to a Dead end. -(defvar cus-test-libs-noloads '("play/dunnet.el") +(defvar cus-test-libs-noloads '("play/dunnet.el" "emulation/edt-mapper.el" + "loadup.el" "mail/blessmail.el") "List of files not to load by `cus-test-load-libs'. Names should be as they appear in loaddefs.el.") @@ -302,6 +303,22 @@ (push (buffer-substring (match-end 0) (line-end-position)) files)) files))) +(defun cus-test-get-lisp-files (&optional all) + "Return list of all Lisp files with defcustoms. +Optional argument ALL non-nil means list all Lisp files." + (let ((default-directory (expand-file-name "lisp/" source-directory)) + (msg "Finding files...")) + (message "%s" msg) + (prog1 + ;; Hack to remove leading "./". + (mapcar (lambda (e) (substring e 2)) + (apply 'process-lines find-program + "-name" "*.el" + (unless all + (list "-exec" grep-program + "-l" "^[ \t]*(defcustom" "{}" "+")))) + (message "%sdone" msg)))) + (defun cus-test-message (list) "Print the members of LIST line by line." (dolist (m list) (message "%s" m))) @@ -401,15 +418,21 @@ (cus-test-message cus-test-deps-errors)) (run-hooks 'cus-test-after-load-libs-hook)) -(defun cus-test-libs () +(defun cus-test-libs (&optional more) "Load the libraries with autoloads in separate processes. This function is useful to detect load problems of libraries. It is suitable for batch mode. E.g., invoke ./src/emacs -batch -l admin/cus-test.el -f cus-test-libs -in the Emacs source directory." +in the Emacs source directory. + +If optional argument MORE is \"defcustom\", load all files with defcustoms. +If it is \"all\", load all Lisp files." (interactive) + (and noninteractive + command-line-args-left + (setq more (pop command-line-args-left))) (cus-test-load-1 (let ((default-directory source-directory) (emacs (expand-file-name "src/emacs")) @@ -436,7 +459,9 @@ (error (push (cons file alpha) cus-test-libs-errors) (message "Error for %s: %s" file alpha))))) - (cus-test-get-autoload-deps)) + (if more + (cus-test-get-lisp-files (equal more "all")) + (cus-test-get-autoload-deps))) (message "Default directory: %s" default-directory) (when skipped (message "The following libraries were skipped:") ------------------------------------------------------------ revno: 112539 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-05-10 14:26:42 +0800 message: * progmodes/octave.el (inferior-octave-completion-table): No longer a function and all uses changed. Use cache to speed up completion due to bug#11906. (octave-beginning-of-defun): Re-write to be more general. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-10 02:01:12 +0000 +++ lisp/ChangeLog 2013-05-10 06:26:42 +0000 @@ -1,3 +1,10 @@ +2013-05-10 Leo Liu + + * progmodes/octave.el (inferior-octave-completion-table): No + longer a function and all uses changed. Use cache to speed up + completion due to bug#11906. + (octave-beginning-of-defun): Re-write to be more general. + 2013-05-10 Glenn Morris * emacs-lisp/cl-macs.el (cl-loop): Doc fix. === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-09 00:52:49 +0000 +++ lisp/progmodes/octave.el 2013-05-10 06:26:42 +0000 @@ -732,13 +732,22 @@ ;; A trick to get the prompt highlighted. (comint-send-string proc "\n"))) -(defun inferior-octave-completion-table () - (completion-table-dynamic - (lambda (command) - (inferior-octave-send-list-and-digest - (list (concat "completion_matches (\"" command "\");\n"))) - (sort (delete-dups inferior-octave-output-list) - 'string-lessp)))) +(defvar inferior-octave-completion-table + ;; + ;; Use cache to avod repetitive computation of completions due to + ;; bug#11906 - http://debbugs.gnu.org/11906 - which may cause + ;; noticeable delay. CACHE: (CMD TIME VALUE). + (let ((cache)) + (completion-table-dynamic + (lambda (command) + (unless (and (equal (car cache) command) + (< (float-time) (+ 5 (cadr cache)))) + (inferior-octave-send-list-and-digest + (list (concat "completion_matches (\"" command "\");\n"))) + (setq cache (list command (float-time) + (sort (delete-dups inferior-octave-output-list) + 'string-lessp)))) + (car (cddr cache)))))) (defun inferior-octave-completion-at-point () "Return the data to complete the Octave symbol at point." @@ -753,7 +762,7 @@ (point))))) (when (and start (> end start)) (list start end (completion-table-in-turn - (inferior-octave-completion-table) + inferior-octave-completion-table 'comint-completion-file-name-table))))) (define-obsolete-function-alias 'inferior-octave-complete @@ -878,7 +887,7 @@ (completing-read (format (if def "Function (default %s): " "Function: ") def) - (inferior-octave-completion-table) + inferior-octave-completion-table nil nil nil nil def))) (defun octave-goto-function-definition () @@ -1155,26 +1164,23 @@ (mark-sexp)) (defun octave-beginning-of-defun (&optional arg) - "Move backward to the beginning of an Octave function. -With positive ARG, do it that many times. Negative argument -N means -move forward to Nth following beginning of a function. -Returns t unless search stops at the beginning or end of the buffer." - (let* ((arg (or arg 1)) - (inc (if (> arg 0) 1 -1)) - (found nil) - (case-fold-search nil)) - (and (not (eobp)) - (not (and (> arg 0) (looking-at "\\_"))) - (skip-syntax-forward "w")) - (while (and (/= arg 0) - (setq found - (re-search-backward "\\_" inc))) - (unless (octave-in-string-or-comment-p) - (setq arg (- arg inc)))) - (if found - (progn - (and (< inc 0) (goto-char (match-beginning 0))) - t)))) + "Octave-specific `beginning-of-defun-function' (which see)." + (or arg (setq arg 1)) + ;; Move out of strings or comments. + (when (octave-in-string-or-comment-p) + (goto-char (octave-in-string-or-comment-p))) + (letrec ((orig (point)) + (toplevel (lambda (pos) + (condition-case nil + (progn + (backward-up-list 1) + (funcall toplevel (point))) + (scan-error pos))))) + (goto-char (funcall toplevel (point))) + (when (and (> arg 0) (/= orig (point))) + (setq arg (1- arg))) + (forward-sexp (- arg)) + (/= orig (point)))) ;;; Filling @@ -1322,7 +1328,7 @@ (when (> end beg) (list beg end (or (and inferior-octave-process (process-live-p inferior-octave-process) - (inferior-octave-completion-table)) + inferior-octave-completion-table) octave-reserved-words))))) (define-obsolete-function-alias 'octave-complete-symbol