Now on revision 112599. ------------------------------------------------------------ revno: 112599 committer: Leo Liu branch nick: trunk timestamp: Thu 2013-05-16 11:41:52 +0800 message: * simple.el (prog-indent-sexp): Indent enclosing defun. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-15 23:55:41 +0000 +++ lisp/ChangeLog 2013-05-16 03:41:52 +0000 @@ -1,3 +1,7 @@ +2013-05-16 Leo Liu + + * simple.el (prog-indent-sexp): Indent enclosing defun. + 2013-05-15 Glenn Morris * cus-start.el (show-trailing-whitespace): Move to editing basics. === modified file 'lisp/simple.el' --- lisp/simple.el 2013-05-08 18:05:40 +0000 +++ lisp/simple.el 2013-05-16 03:41:52 +0000 @@ -380,12 +380,18 @@ map) "Keymap used for programming modes.") -(defun prog-indent-sexp () - "Indent the expression after point." - (interactive) - (let ((start (point)) - (end (save-excursion (forward-sexp 1) (point)))) - (indent-region start end nil))) +(defun prog-indent-sexp (&optional defun) + "Indent the expression after point. +When interactively called with prefix, indent the enclosing defun +instead." + (interactive "P") + (save-excursion + (when defun + (end-of-line) + (beginning-of-defun)) + (let ((start (point)) + (end (progn (forward-sexp 1) (point)))) + (indent-region start end nil)))) (define-derived-mode prog-mode fundamental-mode "Prog" "Major mode for editing programming language source code." ------------------------------------------------------------ revno: 112598 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-15 20:20:34 -0400 message: Add some cus-test.el stuff for custom groups * admin/cus-test.el (cus-test-cus-load-groups): New function. (cus-test-get-options): Add option to return groups. (cus-test-noloads): Also check custom groups. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-05-15 20:12:53 +0000 +++ admin/ChangeLog 2013-05-16 00:20:34 +0000 @@ -1,3 +1,9 @@ +2013-05-16 Glenn Morris + + * cus-test.el (cus-test-cus-load-groups): New function. + (cus-test-get-options): Add option to return groups. + (cus-test-noloads): Also check custom groups. + 2013-05-15 Stefan Monnier * quick-install-emacs: Don't prune DOC-* files a any more. === modified file 'admin/cus-test.el' --- admin/cus-test.el 2013-05-14 02:12:19 +0000 +++ admin/cus-test.el 2013-05-16 00:20:34 +0000 @@ -232,17 +232,38 @@ (length cus-test-tested-variables)) (cus-test-errors-display)) -(defun cus-test-get-options (regexp) - "Return a list of custom options matching REGEXP." - (let (found) +(defun cus-test-cus-load-groups (&optional cus-load) + "Return a list of current custom groups. +If CUS-LOAD is non-nil, include groups from cus-load.el." + (append (mapcar 'cdr custom-current-group-alist) + (if cus-load + (with-temp-buffer + (insert-file-contents (locate-library "cus-load.el")) + (search-forward "(put '") + (beginning-of-line) + (let (res) + (while (and (looking-at "^(put '\\(\\S-+\\)") + (zerop (forward-line 1))) + (push (intern (match-string 1)) res)) + res))))) + +(defun cus-test-get-options (regexp &optional group) + "Return a list of custom options matching REGEXP. +If GROUP is non-nil, return groups rather than options. +If GROUP is `cus-load', include groups listed in cus-loads as well as +currently defined groups." + (let ((groups (if group (cus-test-cus-load-groups (eq group 'cus-load)))) + found) (mapatoms (lambda (symbol) (and - (or - ;; (user-variable-p symbol) - (get symbol 'standard-value) - ;; (get symbol 'saved-value) - (get symbol 'custom-type)) + (if group + (memq symbol groups) + (or + ;; (user-variable-p symbol) + (get symbol 'standard-value) + ;; (get symbol 'saved-value) + (get symbol 'custom-type))) (string-match regexp (symbol-name symbol)) (not (member symbol cus-test-skip-list)) (push symbol found)))) @@ -492,17 +513,17 @@ in the Emacs source directory." (interactive) - (let (cus-loaded) + (let ((groups-loaded (cus-test-get-options "" 'cus-load)) + cus-loaded groups-not-loaded) (message "Running %s" 'cus-test-load-custom-loads) (cus-test-load-custom-loads) - (setq cus-loaded - (cus-test-get-options "")) + (setq cus-loaded (cus-test-get-options "")) (message "Running %s" 'cus-test-load-libs) (cus-test-load-libs "all") - (setq cus-test-vars-not-cus-loaded - (cus-test-get-options "")) + (setq cus-test-vars-not-cus-loaded (cus-test-get-options "") + groups-not-loaded (cus-test-get-options "" t)) (dolist (o cus-loaded) (setq cus-test-vars-not-cus-loaded @@ -512,7 +533,15 @@ (message "No options not loaded by custom-load-symbol found") (message "The following options were not loaded by custom-load-symbol:") (cus-test-message - (sort cus-test-vars-not-cus-loaded 'string<))))) + (sort cus-test-vars-not-cus-loaded 'string<))) + + (dolist (o groups-loaded) + (setq groups-not-loaded (delete o groups-not-loaded))) + + (if (not groups-not-loaded) + (message "No groups not in cus-load.el found") + (message "The following groups are not in cus-load.el:") + (cus-test-message (sort groups-not-loaded 'string<))))) (provide 'cus-test) ------------------------------------------------------------ revno: 112597 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-15 19:55:41 -0400 message: Misc custom group fixes * cus-start.el (show-trailing-whitespace): Move to editing basics. * faces.el (trailing-whitespace): Don't use whitespace-faces group. * obsolete/old-whitespace.el (whitespace-faces): Remove group. (whitespace-highlight): Move to whitespace group. * comint.el (comint-source): * pcmpl-linux.el (pcmpl-linux): * shell.el (shell-faces): * eshell/esh-opt.el (eshell-opt): * international/ccl.el (ccl): Remove empty custom groups. * completion.el (dynamic-completion-mode): * jit-lock.el (jit-lock-debug-mode): * minibuffer.el (completion-in-region-mode): * type-break.el (type-break-mode-line-message-mode) (type-break-query-mode): * emulation/tpu-edt.el (tpu-edt-mode): * progmodes/subword.el (global-subword-mode, global-superword-mode): * progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode): * term/vt100.el (vt100-wide-mode): Specify explicit :group. * term/xterm.el (xterm): Change parent group to terminals. * master.el (master): Remove empty custom group. (master-mode): Remove unused :group argument. * textmodes/refill.el (refill): Remove empty custom group. (refill-mode): Remove unused :group argument. * textmodes/rst.el (rst-compile-toolsets): Use rst-compile group. * cedet/semantic/symref/list.el (semantic-symref-auto-expand-results) (semantic-symref-results-mode-hook) (semantic-symref-results-summary-function): Fix :group. * erc/erc-list.el (erc-list): * erc/erc-menu.el (erc-menu): * erc/erc-ring.el (erc-ring): Define custom groups, for define-erc-module. * gnus/shr-color.el (shr-color-visible-luminance-min) (shr-color-visible-distance-min): Use shr-color group. * url/url-news.el (url-news): Remove empty custom group. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-15 23:35:10 +0000 +++ lisp/ChangeLog 2013-05-15 23:55:41 +0000 @@ -1,5 +1,35 @@ 2013-05-15 Glenn Morris + * cus-start.el (show-trailing-whitespace): Move to editing basics. + * faces.el (trailing-whitespace): Don't use whitespace-faces group. + * obsolete/old-whitespace.el (whitespace-faces): Remove group. + (whitespace-highlight): Move to whitespace group. + + * comint.el (comint-source): + * pcmpl-linux.el (pcmpl-linux): + * shell.el (shell-faces): + * eshell/esh-opt.el (eshell-opt): + * international/ccl.el (ccl): Remove empty custom groups. + + * completion.el (dynamic-completion-mode): + * jit-lock.el (jit-lock-debug-mode): + * minibuffer.el (completion-in-region-mode): + * type-break.el (type-break-mode-line-message-mode) + (type-break-query-mode): + * emulation/tpu-edt.el (tpu-edt-mode): + * progmodes/subword.el (global-subword-mode, global-superword-mode): + * progmodes/vhdl-mode.el (vhdl-electric-mode, vhdl-stutter-mode): + * term/vt100.el (vt100-wide-mode): Specify explicit :group. + + * term/xterm.el (xterm): Change parent group to terminals. + + * master.el (master): Remove empty custom group. + (master-mode): Remove unused :group argument. + * textmodes/refill.el (refill): Remove empty custom group. + (refill-mode): Remove unused :group argument. + + * textmodes/rst.el (rst-compile-toolsets): Use rst-compile group. + * cus-dep.el: Provide a feature. (custom-make-dependencies): Ignore dotfiles (dir-locals). Don't mistakenly ignore files whose basenames match a basename === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-05-14 02:10:23 +0000 +++ lisp/cedet/ChangeLog 2013-05-15 23:55:41 +0000 @@ -1,3 +1,9 @@ +2013-05-15 Glenn Morris + + * semantic/symref/list.el (semantic-symref-auto-expand-results) + (semantic-symref-results-mode-hook) + (semantic-symref-results-summary-function): Fix :group. + 2013-05-14 Glenn Morris * ede/simple.el, semantic/java.el: Set generated-autoload-load-name. === modified file 'lisp/cedet/semantic/symref/list.el' --- lisp/cedet/semantic/symref/list.el 2013-01-01 09:11:05 +0000 +++ lisp/cedet/semantic/symref/list.el 2013-05-15 23:55:41 +0000 @@ -178,12 +178,12 @@ (defcustom semantic-symref-auto-expand-results nil "Non-nil to expand symref results on buffer creation." - :group 'semantic-symref + :group 'semantic-symref-results-mode :type 'boolean) (defcustom semantic-symref-results-mode-hook nil "Hook run when `semantic-symref-results-mode' starts." - :group 'semantic-symref + :group 'semantic-symref-results-mode :type 'hook) (defvar semantic-symref-current-results nil @@ -217,7 +217,7 @@ (defcustom semantic-symref-results-summary-function 'semantic-format-tag-prototype "*Function to use when creating items in Imenu. Some useful functions are found in `semantic-format-tag-functions'." - :group 'semantic-symref + :group 'semantic-symref-results-mode :type semantic-format-tag-custom-list) (defun semantic-symref-results-dump (results) === modified file 'lisp/comint.el' --- lisp/comint.el 2013-05-09 17:54:29 +0000 +++ lisp/comint.el 2013-05-15 23:55:41 +0000 @@ -148,10 +148,11 @@ "Completion facilities in comint." :group 'comint) -(defgroup comint-source nil - "Source finding facilities in comint." - :prefix "comint-" - :group 'comint) +;; Unused. +;;; (defgroup comint-source nil +;;; "Source finding facilities in comint." +;;; :prefix "comint-" +;;; :group 'comint) (defvar comint-prompt-regexp "^" "Regexp to recognize prompts in the inferior process. === modified file 'lisp/completion.el' --- lisp/completion.el 2013-01-01 09:11:05 +0000 +++ lisp/completion.el 2013-05-15 23:55:41 +0000 @@ -2342,6 +2342,7 @@ and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil." :global t + :group 'completion ;; This is always good, not specific to dynamic-completion-mode. (define-key function-key-map [C-return] [?\C-\r]) === modified file 'lisp/cus-start.el' --- lisp/cus-start.el 2013-05-09 01:40:20 +0000 +++ lisp/cus-start.el 2013-05-15 23:55:41 +0000 @@ -449,7 +449,8 @@ (other :tag "Always (t)" :value t)) "24.3") ;; xdisp.c - (show-trailing-whitespace whitespace-faces boolean nil + ;; The whitespace group is for whitespace.el. + (show-trailing-whitespace editing-basics boolean nil :safe booleanp) (scroll-step windows integer) (scroll-conservatively windows integer) === modified file 'lisp/emulation/tpu-edt.el' --- lisp/emulation/tpu-edt.el 2013-05-12 10:22:44 +0000 +++ lisp/emulation/tpu-edt.el 2013-05-15 23:55:41 +0000 @@ -983,7 +983,7 @@ With a prefix argument ARG, enable the mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil." - :global t + :global t :group 'tpu (if tpu-edt-mode (tpu-edt-on) (tpu-edt-off))) (defalias 'TPU-EDT-MODE 'tpu-edt-mode) === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2013-05-09 01:40:20 +0000 +++ lisp/erc/ChangeLog 2013-05-15 23:55:41 +0000 @@ -1,3 +1,11 @@ +2013-05-15 Glenn Morris + + * erc-list.el (erc-list): + * erc-menu.el (erc-menu): + * erc-ring.el (erc-ring): Define custom groups, for define-erc-module. + + * erc-list.el: Provide a feature. + 2013-05-09 Glenn Morris * erc-desktop-notifications.el (erc-notifications-icon): === modified file 'lisp/erc/erc-list.el' --- lisp/erc/erc-list.el 2013-01-01 09:11:05 +0000 +++ lisp/erc/erc-list.el 2013-05-15 23:55:41 +0000 @@ -30,6 +30,10 @@ (require 'erc) +(defgroup erc-list nil + "Support for the /list command." + :group 'erc) + ;; This is implicitly the width of the channel name column. Pick ;; something small enough that the topic has a chance of being ;; readable, but long enough that most channel names won't make for @@ -214,6 +218,8 @@ "")))) (put 'erc-cmd-LIST 'do-not-parse-args t) +(provide 'erc-list) + ;;; erc-list.el ends here ;; ;; Local Variables: === modified file 'lisp/erc/erc-menu.el' --- lisp/erc/erc-menu.el 2013-01-01 09:11:05 +0000 +++ lisp/erc/erc-menu.el 2013-05-15 23:55:41 +0000 @@ -30,6 +30,10 @@ (require 'erc) (require 'easymenu) +(defgroup erc-menu nil + "ERC menu support." + :group 'erc) + (defvar erc-menu-definition (list "ERC" ["Connect to server..." erc t] === modified file 'lisp/erc/erc-ring.el' --- lisp/erc/erc-ring.el 2013-01-01 09:11:05 +0000 +++ lisp/erc/erc-ring.el 2013-05-15 23:55:41 +0000 @@ -38,6 +38,10 @@ (require 'comint) (require 'ring) +(defgroup erc-ring nil + "An input ring for ERC." + :group 'erc) + ;;;###autoload (autoload 'erc-ring-mode "erc-ring" nil t) (define-erc-module ring nil "Stores input in a ring so that previous commands and messages can === modified file 'lisp/eshell/esh-opt.el' --- lisp/eshell/esh-opt.el 2013-01-01 09:11:05 +0000 +++ lisp/eshell/esh-opt.el 2013-05-15 23:55:41 +0000 @@ -27,11 +27,12 @@ (eval-when-compile (require 'esh-ext)) -(defgroup eshell-opt nil - "The options processing code handles command argument parsing for -Eshell commands implemented in Lisp." - :tag "Command options processing" - :group 'eshell) +;; Unused. +;;; (defgroup eshell-opt nil +;;; "The options processing code handles command argument parsing for +;;; Eshell commands implemented in Lisp." +;;; :tag "Command options processing" +;;; :group 'eshell) ;;; User Functions: === modified file 'lisp/faces.el' --- lisp/faces.el 2013-05-11 02:27:28 +0000 +++ lisp/faces.el 2013-05-15 23:55:41 +0000 @@ -2292,7 +2292,6 @@ (t :inverse-video t)) "Basic face for highlighting trailing whitespace." :version "21.1" - :group 'whitespace-faces ; like `show-trailing-whitespace' :group 'basic-faces) (defface escape-glyph === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-11 02:25:11 +0000 +++ lisp/gnus/ChangeLog 2013-05-15 23:55:41 +0000 @@ -1,3 +1,8 @@ +2013-05-15 Glenn Morris + + * shr-color.el (shr-color-visible-luminance-min) + (shr-color-visible-distance-min): Use shr-color group. + 2013-05-11 Glenn Morris * gnus-vm.el: Make it loadable without VM. === modified file 'lisp/gnus/shr-color.el' --- lisp/gnus/shr-color.el 2013-05-09 01:40:20 +0000 +++ lisp/gnus/shr-color.el 2013-05-15 23:55:41 +0000 @@ -36,14 +36,14 @@ (defcustom shr-color-visible-luminance-min 40 "Minimum luminance distance between two colors to be considered visible. Must be between 0 and 100." - :group 'shr + :group 'shr-color :type 'number) (defcustom shr-color-visible-distance-min 5 "Minimum color distance between two colors to be considered visible. This value is used to compare result for `ciede2000'. It's an absolute value without any unit." - :group 'shr + :group 'shr-color :type 'integer) (defconst shr-color-html-colors-alist === modified file 'lisp/international/ccl.el' --- lisp/international/ccl.el 2013-01-01 09:11:05 +0000 +++ lisp/international/ccl.el 2013-05-15 23:55:41 +0000 @@ -43,10 +43,11 @@ ;;; Code: -(defgroup ccl nil - "CCL (Code Conversion Language) compiler." - :prefix "ccl-" - :group 'i18n) +;; Unused. +;;; (defgroup ccl nil +;;; "CCL (Code Conversion Language) compiler." +;;; :prefix "ccl-" +;;; :group 'i18n) (defconst ccl-command-table [if branch loop break repeat write-repeat write-read-repeat === modified file 'lisp/jit-lock.el' --- lisp/jit-lock.el 2013-04-23 12:29:14 +0000 +++ lisp/jit-lock.el 2013-05-15 23:55:41 +0000 @@ -258,7 +258,7 @@ When this minor mode is enabled, jit-lock runs as little code as possible during redisplay and moves the rest to a timer, where things like `debug-on-error' and Edebug can be used." - :global t + :global t :group 'jit-lock (when jit-lock-defer-timer (cancel-timer jit-lock-defer-timer) (setq jit-lock-defer-timer nil)) === modified file 'lisp/master.el' --- lisp/master.el 2013-01-01 09:11:05 +0000 +++ lisp/master.el 2013-05-15 23:55:41 +0000 @@ -53,10 +53,11 @@ ;;; Code: -(defgroup master nil - "Support for master/slave relationships between buffers." - :version "22.1" - :group 'convenience) +;; Unused. +;;; (defgroup master nil +;;; "Support for master/slave relationships between buffers." +;;; :version "22.1" +;;; :group 'convenience) ;; Variables that don't need initialization. @@ -84,7 +85,8 @@ The slave buffer is stored in the buffer-local variable `master-of'. You can set this variable using `master-set-slave'. You can show yourself the value of `master-of' by calling `master-show-slave'." - :group 'master + ;; Not global, so no effect. +;;; :group 'master :keymap '(("\C-c\C-n" . master-says-scroll-up) ("\C-c\C-p" . master-says-scroll-down) === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2013-04-23 12:27:06 +0000 +++ lisp/minibuffer.el 2013-05-15 23:55:41 +0000 @@ -1856,6 +1856,7 @@ positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil." :global t + :group 'minibuffer (setq completion-in-region--data nil) ;; (remove-hook 'pre-command-hook #'completion-in-region--prech) (remove-hook 'post-command-hook #'completion-in-region--postch) === modified file 'lisp/obsolete/old-whitespace.el' --- lisp/obsolete/old-whitespace.el 2013-01-01 09:11:05 +0000 +++ lisp/obsolete/old-whitespace.el 2013-05-15 23:55:41 +0000 @@ -288,12 +288,6 @@ :type 'boolean :group 'whitespace) -(defgroup whitespace-faces nil - "Faces used in whitespace." - :prefix "whitespace-" - :group 'whitespace - :group 'faces) - (defface whitespace-highlight '((((class color) (background light)) (:background "green1")) (((class color) (background dark)) @@ -305,7 +299,7 @@ (background dark)) (:background "white"))) "Face used for highlighting the bogus whitespaces that exist in the buffer." - :group 'whitespace-faces) + :group 'whitespace) (define-obsolete-face-alias 'whitespace-highlight-face 'whitespace-highlight "22.1") === modified file 'lisp/org/org-pcomplete.el' --- lisp/org/org-pcomplete.el 2013-01-01 09:11:05 +0000 +++ lisp/org/org-pcomplete.el 2013-05-15 23:55:41 +0000 @@ -46,6 +46,7 @@ ;;;; Customization variables +;; Unused. Cf org-completion. (defgroup org-complete nil "Outline-based notes management and organizer." :tag "Org" === modified file 'lisp/pcmpl-linux.el' --- lisp/pcmpl-linux.el 2013-01-01 09:11:05 +0000 +++ lisp/pcmpl-linux.el 2013-05-15 23:55:41 +0000 @@ -31,9 +31,10 @@ (require 'pcomplete) -(defgroup pcmpl-linux nil - "Functions for dealing with GNU/Linux completions." - :group 'pcomplete) +;; Unused. +;;; (defgroup pcmpl-linux nil +;;; "Functions for dealing with GNU/Linux completions." +;;; :group 'pcomplete) ;; Functions: === modified file 'lisp/progmodes/subword.el' --- lisp/progmodes/subword.el 2013-03-30 01:32:12 +0000 +++ lisp/progmodes/subword.el 2013-05-15 23:55:41 +0000 @@ -148,6 +148,7 @@ ;;;###autoload (define-global-minor-mode global-subword-mode subword-mode + :group 'convenience (lambda () (subword-mode 1))) (defun subword-forward (&optional arg) @@ -301,6 +302,7 @@ ;;;###autoload (define-global-minor-mode global-superword-mode superword-mode + :group 'convenience (lambda () (superword-mode 1))) === modified file 'lisp/progmodes/vhdl-mode.el' --- lisp/progmodes/vhdl-mode.el 2013-05-08 16:27:53 +0000 +++ lisp/progmodes/vhdl-mode.el 2013-05-15 23:55:41 +0000 @@ -8327,14 +8327,14 @@ With a prefix argument ARG, enable the mode if ARG is positive, and disable it otherwise. If called from Lisp, enable it if ARG is omitted or nil." - :global t) + :global t :group 'vhdl-mode) (define-minor-mode vhdl-stutter-mode "Toggle VHDL stuttering mode. With a prefix argument ARG, enable the mode if ARG is positive, and disable it otherwise. If called from Lisp, enable it if ARG is omitted or nil." - :global t) + :global t :group 'vhdl-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Stuttering === modified file 'lisp/shell.el' --- lisp/shell.el 2013-01-02 16:13:04 +0000 +++ lisp/shell.el 2013-05-15 23:55:41 +0000 @@ -111,9 +111,10 @@ "Directory support in shell mode." :group 'shell) -(defgroup shell-faces nil - "Faces in shell buffers." - :group 'shell) +;; Unused. +;;; (defgroup shell-faces nil +;;; "Faces in shell buffers." +;;; :group 'shell) ;;;###autoload (defcustom shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") === modified file 'lisp/term/vt100.el' --- lisp/term/vt100.el 2013-01-01 09:11:05 +0000 +++ lisp/term/vt100.el 2013-05-15 23:55:41 +0000 @@ -46,6 +46,7 @@ positive, and 80-column mode otherwise. If called from Lisp, switch to 132-column mode if ARG is omitted or nil." :global t :init-value (= (frame-width) 132) + :group 'terminals (send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l")) (set-frame-width terminal-frame (if vt100-wide-mode 132 80))) === modified file 'lisp/term/xterm.el' --- lisp/term/xterm.el 2013-05-14 02:08:35 +0000 +++ lisp/term/xterm.el 2013-05-15 23:55:41 +0000 @@ -27,7 +27,7 @@ (defgroup xterm nil "XTerm support." :version "24.1" - :group 'environment) + :group 'terminals) (defcustom xterm-extra-capabilities 'check "Whether Xterm supports some additional, more modern, features. === modified file 'lisp/textmodes/refill.el' --- lisp/textmodes/refill.el 2013-01-01 09:11:05 +0000 +++ lisp/textmodes/refill.el 2013-05-15 23:55:41 +0000 @@ -83,9 +83,10 @@ ;;; Code: -(defgroup refill nil - "Refilling paragraphs on changes." - :group 'fill) +;; Unused. +;;; (defgroup refill nil +;;; "Refilling paragraphs on changes." +;;; :group 'fill) (defvar refill-ignorable-overlay nil "Portion of the most recently filled paragraph not needing filling. @@ -222,7 +223,8 @@ auto-filling. For true \"word wrap\" behavior, use `visual-line-mode' instead." - :group 'refill + ;; Not global, so no effect. +;;; :group 'refill :lighter " Refill" :keymap '(("\177" . backward-delete-char-untabify)) ;; Remove old state if necessary === modified file 'lisp/textmodes/rst.el' --- lisp/textmodes/rst.el 2013-01-01 09:11:05 +0000 +++ lisp/textmodes/rst.el 2013-05-15 23:55:41 +0000 @@ -3932,7 +3932,7 @@ (choice :tag "Command options" (const :tag "No options" nil) (string :tag "Options")))) - :group 'rst + :group 'rst-compile :package-version "1.2.0") (rst-testcover-defcustom) === modified file 'lisp/type-break.el' --- lisp/type-break.el 2013-05-09 01:40:20 +0000 +++ lisp/type-break.el 2013-05-15 23:55:41 +0000 @@ -418,7 +418,7 @@ `global-mode-string' `type-break-mode-line-break-message' `type-break-mode-line-warning'" - :global t) + :global t :group 'type-break) (define-minor-mode type-break-query-mode "Toggle typing break queries. @@ -428,7 +428,7 @@ The user may also enable or disable this mode simply by setting the variable of the same name." - :global t) + :global t :group 'type-break) ;;; session file functions === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2013-03-11 16:31:55 +0000 +++ lisp/url/ChangeLog 2013-05-15 23:55:41 +0000 @@ -1,3 +1,7 @@ +2013-05-15 Glenn Morris + + * url-news.el (url-news): Remove empty custom group. + 2013-02-16 Glenn Morris * url-http.el (url-http-wait-for-headers-change-function): === modified file 'lisp/url/url-news.el' --- lisp/url/url-news.el 2013-01-01 09:11:05 +0000 +++ lisp/url/url-news.el 2013-05-15 23:55:41 +0000 @@ -28,9 +28,10 @@ (autoload 'url-warn "url") (autoload 'gnus-group-read-ephemeral-group "gnus-group") -(defgroup url-news nil - "News related options." - :group 'url) +;; Unused. +;;; (defgroup url-news nil +;;; "News related options." +;;; :group 'url) (defun url-news-open-host (host port user pass) (if (fboundp 'nnheader-init-server-buffer) ------------------------------------------------------------ revno: 112596 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-15 19:35:10 -0400 message: * lisp/cus-dep.el (custom-make-dependencies): Add a fallback method for getting :group. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-15 23:31:16 +0000 +++ lisp/ChangeLog 2013-05-15 23:35:10 +0000 @@ -1,8 +1,10 @@ 2013-05-15 Glenn Morris - * cus-dep.el (custom-make-dependencies): Ignore dotfiles (dir-locals). + * cus-dep.el: Provide a feature. + (custom-make-dependencies): Ignore dotfiles (dir-locals). Don't mistakenly ignore files whose basenames match a basename from preloaded-file-list (eg cedet/ede/simple.el). + Add a fallback method for getting :group. 2013-05-15 Juri Linkov === modified file 'lisp/cus-dep.el' --- lisp/cus-dep.el 2013-05-15 23:31:16 +0000 +++ lisp/cus-dep.el 2013-05-15 23:35:10 +0000 @@ -89,13 +89,30 @@ (while (re-search-forward "^(def\\(custom\\|face\\|group\\)" nil t) (beginning-of-line) - (let ((expr (read (current-buffer)))) + (let ((type (match-string 1)) + (expr (read (current-buffer)))) (condition-case nil (let ((custom-dont-initialize t)) - ;; Why do we need to eval just for the name? - (eval expr) - (put (nth 1 expr) 'custom-where name)) - (error nil)))) + ;; Eval to get the 'custom-group, -tag, + ;; -version, group-documentation etc properties. + (put (nth 1 expr) 'custom-where name) + (eval expr)) + ;; Eval failed for some reason. Eg maybe the + ;; defcustom uses something defined earlier + ;; in the file (we haven't loaded the file). + ;; In most cases, we can still get the :group. + (error + (ignore-errors + (let ((group (cadr (memq :group expr)))) + (and group + (eq (car group) 'quote) + (custom-add-to-group + (cadr group) + (nth 1 expr) + (intern (format "custom-%s" + (if (equal type "custom") + "variable" + type))))))))))) (error nil))))))))) (message "Generating %s..." generated-custom-dependencies-file) (set-buffer (find-file-noselect generated-custom-dependencies-file)) @@ -185,5 +202,6 @@ (message "Generating %s...done" generated-custom-dependencies-file)) +(provide 'cus-dep) ;;; cus-dep.el ends here ------------------------------------------------------------ revno: 112595 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-15 19:31:16 -0400 message: custom-make-dependencies tweaks * lisp/cus-dep.el (custom-make-dependencies): Ignore dotfiles (dir-locals). Don't mistakenly ignore files whose basenames match a basename from preloaded-file-list (eg cedet/ede/simple.el). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-15 23:21:01 +0000 +++ lisp/ChangeLog 2013-05-15 23:31:16 +0000 @@ -1,3 +1,9 @@ +2013-05-15 Glenn Morris + + * cus-dep.el (custom-make-dependencies): Ignore dotfiles (dir-locals). + Don't mistakenly ignore files whose basenames match a basename + from preloaded-file-list (eg cedet/ede/simple.el). + 2013-05-15 Juri Linkov * isearch.el (isearch-char-by-name): Rename from === modified file 'lisp/cus-dep.el' --- lisp/cus-dep.el 2013-05-13 16:21:00 +0000 +++ lisp/cus-dep.el 2013-05-15 23:31:16 +0000 @@ -61,16 +61,14 @@ ;; the args as directories after we are done. (while (setq subdir (pop command-line-args-left)) (message "Directory %s" subdir) - (let ((files (directory-files subdir nil "\\`[^=].*\\.el\\'")) + (let ((files (directory-files subdir nil "\\`[^=.].*\\.el\\'")) (default-directory (expand-file-name subdir)) - (preloaded (concat "\\`" - (regexp-opt (mapcar - 'file-name-base - preloaded-file-list) t) + (preloaded (concat "\\`\\(\\./+\\)?" + (regexp-opt preloaded-file-list t) "\\.el\\'"))) (dolist (file files) (unless (or (string-match custom-dependencies-no-scan-regexp file) - (string-match preloaded file) + (string-match preloaded (format "%s/%s" subdir file)) (not (file-exists-p file))) (erase-buffer) (kill-all-local-variables) ------------------------------------------------------------ revno: 112594 fixes bug: http://debbugs.gnu.org/13348 committer: Juri Linkov branch nick: trunk timestamp: Thu 2013-05-16 02:21:01 +0300 message: * lisp/isearch.el (isearch-char-by-name): Rename from `isearch-insert-char-by-name'. Doc fix. (isearch-forward): Mention `isearch-char-by-name' in the docstring. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-15 23:14:18 +0000 +++ lisp/ChangeLog 2013-05-15 23:21:01 +0000 @@ -1,5 +1,10 @@ 2013-05-15 Juri Linkov + * isearch.el (isearch-char-by-name): Rename from + `isearch-insert-char-by-name'. Doc fix. + (isearch-forward): Mention `isearch-char-by-name' in + the docstring. (Bug#13348) + * isearch.el (minibuffer-local-isearch-map): Bind "\r" to `exit-minibuffer' instead of `isearch-nonincremental-exit-minibuffer'. === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-05-15 23:14:18 +0000 +++ lisp/isearch.el 2013-05-15 23:21:01 +0000 @@ -515,12 +515,12 @@ (define-key map "\M-so" 'isearch-occur) (define-key map "\M-shr" 'isearch-highlight-regexp) - ;; The key translations defined in the C-x 8 prefix should insert - ;; characters into the search string. See iso-transl.el. + ;; The key translations defined in the C-x 8 prefix should add + ;; characters to the search string. See iso-transl.el. (define-key map "\C-x" nil) (define-key map [?\C-x t] 'isearch-other-control-char) (define-key map "\C-x8" nil) - (define-key map "\C-x8\r" 'isearch-insert-char-by-name) + (define-key map "\C-x8\r" 'isearch-char-by-name) map) "Keymap for `isearch-mode'.") @@ -679,6 +679,8 @@ Type \\[isearch-yank-pop] to replace string just yanked into search prompt with string killed before it. Type \\[isearch-quote-char] to quote control character to search for it. +Type \\[isearch-char-by-name] to add a character to search by Unicode name,\ + with completion. \\[isearch-abort] while searching or when search has failed cancels input\ back to what has been found successfully. @@ -1870,11 +1872,12 @@ (lambda () (let ((inhibit-field-text-motion t)) (line-end-position (if (eolp) 2 1)))))) -(defun isearch-insert-char-by-name () - "Read a character by its Unicode name and insert it into search string." +(defun isearch-char-by-name () + "Read a character by its Unicode name and add it to the search string. +Completion is available like in `read-char-by-name' used by `insert-char'." (interactive) (with-isearch-suspended - (let ((char (read-char-by-name "Insert character (Unicode name or hex): "))) + (let ((char (read-char-by-name "Add character to search (Unicode name or hex): "))) (when char (setq isearch-new-string (concat isearch-string (string char)) isearch-new-message (concat isearch-message ------------------------------------------------------------ revno: 112593 fixes bug: http://debbugs.gnu.org/13348 committer: Juri Linkov branch nick: trunk timestamp: Thu 2013-05-16 02:14:18 +0300 message: * lisp/isearch.el (minibuffer-local-isearch-map): Bind "\r" to `exit-minibuffer' instead of `isearch-nonincremental-exit-minibuffer'. (isearch-edit-string): Remove mention of `isearch-nonincremental-exit-minibuffer' from docstring. (isearch-nonincremental-exit-minibuffer): Mark as obsolete. (isearch-forward-exit-minibuffer) (isearch-reverse-exit-minibuffer): Add docstring. (Bug#13348) * doc/emacs/search.texi (Repeat Isearch): Mention key `RET' to finish editing the string. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-05-14 02:04:02 +0000 +++ doc/emacs/ChangeLog 2013-05-15 23:14:18 +0000 @@ -1,3 +1,8 @@ +2013-05-15 Juri Linkov + + * search.texi (Repeat Isearch): Mention key `RET' to finish + editing the string. (Bug#13348) + 2013-05-14 Glenn Morris * ack.texi (Acknowledgments): Don't mention obsolete sup-mouse.el. === modified file 'doc/emacs/search.texi' --- doc/emacs/search.texi 2013-01-01 09:11:05 +0000 +++ doc/emacs/search.texi 2013-05-15 23:14:18 +0000 @@ -175,7 +175,7 @@ @kindex M-e @r{(Incremental search)} To edit the current search string in the minibuffer without -replacing it with items from the search ring, type @kbd{M-e}. Type +replacing it with items from the search ring, type @kbd{M-e}. Type @key{RET}, @kbd{C-s} or @kbd{C-r} to finish editing the string and search for it. @node Error in Isearch === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-15 20:12:53 +0000 +++ lisp/ChangeLog 2013-05-15 23:14:18 +0000 @@ -1,3 +1,14 @@ +2013-05-15 Juri Linkov + + * isearch.el (minibuffer-local-isearch-map): Bind "\r" to + `exit-minibuffer' instead of + `isearch-nonincremental-exit-minibuffer'. + (isearch-edit-string): Remove mention of + `isearch-nonincremental-exit-minibuffer' from docstring. + (isearch-nonincremental-exit-minibuffer): Mark as obsolete. + (isearch-forward-exit-minibuffer) + (isearch-reverse-exit-minibuffer): Add docstring. (Bug#13348) + 2013-05-15 Stefan Monnier * loadup.el: Just use unversioned DOC. === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-05-01 08:10:12 +0000 +++ lisp/isearch.el 2013-05-15 23:14:18 +0000 @@ -47,7 +47,7 @@ ;; modify the search string before executing the search. There are ;; three commands to terminate the editing: C-s and C-r exit the ;; minibuffer and search forward and reverse respectively, while C-m -;; exits and does a nonincremental search. +;; exits and searches in the last search direction. ;; Exiting immediately from isearch uses isearch-edit-string instead ;; of nonincremental-search, if search-nonincremental-instead is non-nil. @@ -528,7 +528,7 @@ (defvar minibuffer-local-isearch-map (let ((map (make-sparse-keymap))) (set-keymap-parent map minibuffer-local-map) - (define-key map "\r" 'isearch-nonincremental-exit-minibuffer) + (define-key map "\r" 'exit-minibuffer) (define-key map "\M-\t" 'isearch-complete-edit) (define-key map "\C-s" 'isearch-forward-exit-minibuffer) (define-key map "\C-r" 'isearch-reverse-exit-minibuffer) @@ -1273,7 +1273,6 @@ The following additional command keys are active while editing. \\ \\[exit-minibuffer] to resume incremental searching with the edited string. -\\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search. \\[isearch-forward-exit-minibuffer] to resume isearching forward. \\[isearch-reverse-exit-minibuffer] to resume isearching backward. \\[isearch-complete-edit] to complete the search string using the search ring." @@ -1307,13 +1306,18 @@ (interactive) (setq isearch-nonincremental t) (exit-minibuffer)) +;; Changing the value of `isearch-nonincremental' has no effect here, +;; because `isearch-edit-string' ignores this change. Thus marked as obsolete. +(make-obsolete 'isearch-nonincremental-exit-minibuffer 'exit-minibuffer "24.4") (defun isearch-forward-exit-minibuffer () + "Resume isearching forward from the minibuffer that edits the search string." (interactive) (setq isearch-new-forward t) (exit-minibuffer)) (defun isearch-reverse-exit-minibuffer () + "Resume isearching backward from the minibuffer that edits the search string." (interactive) (setq isearch-new-forward nil) (exit-minibuffer)) ------------------------------------------------------------ revno: 112592 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2013-05-15 16:12:53 -0400 message: Use just DOC instead of DOC-nn.mm. * lisp/loadup.el: Just use unversioned DOC. * Makefile.in (install-doc): DOC file is not version specific any more. * .bzrignore: Don't ignore DOC-* any more. * admin/quick-install-emacs: Don't prune DOC-* files a any more. * doc/lispref/loading.texi (Autoload): * doc/lispref/help.texi (Documentation Basics, Accessing Documentation) (Accessing Documentation, Accessing Documentation): DOC-* is now DOC. * etc/.gitignore: Don't ignore DOC-* any more. * lib-src/makefile.w32-in ($(DOC)): Use DOC rather than DOC-X. * msdos/sed1x.inp: Don't rewrite DOC any more. * nt/makefile.w32-in (clean, top-distclean): DOC-X doesn't exist any more. * src/Makefile.in (bootstrap-clean): DOC-* doesn't exist any more. * src/makefile.w32-in (DOC): Use just "DOC". diff: === modified file '.bzrignore' --- .bzrignore 2013-03-30 06:23:47 +0000 +++ .bzrignore 2013-05-15 20:12:53 +0000 @@ -23,7 +23,6 @@ conftest* core DOC -DOC-* emacs-*/ makefile Makefile === modified file 'ChangeLog' --- ChangeLog 2013-05-13 06:23:08 +0000 +++ ChangeLog 2013-05-15 20:12:53 +0000 @@ -1,3 +1,8 @@ +2013-05-15 Stefan Monnier + + * Makefile.in (install-doc): DOC file is not version specific any more. + * .bzrignore: Don't ignore DOC-* any more. + 2013-05-13 Paul Eggert * configure.ac (LD_SWITCH_SYSTEM_TEMACS): OpenBSD needs -nopie. === modified file 'Makefile.in' --- Makefile.in 2013-04-18 05:03:53 +0000 +++ Makefile.in 2013-05-15 20:12:53 +0000 @@ -581,10 +581,6 @@ ## guaranteed to do the right thing; eg if we are root and tar is ## preserving source permissions. -## We install only the relevant DOC file if possible -## (ie DOC-${version}.buildnumber), otherwise DOC-${version}*. -## (Note "otherwise" is inaccurate since 2009-08-23.) - ## Note that install-arch-indep deletes and recreates the entire ## installed etc/ directory, so we need it to run before this does. install-doc: src install-arch-indep @@ -592,13 +588,7 @@ umask 022; ${MKDIR_P} $(DESTDIR)${docdir} ; \ if [ `cd ./etc; /bin/pwd` != `cd $(DESTDIR)${docdir}; /bin/pwd` ]; \ then \ - fullversion=`./src/emacs --version | sed -n '1 s/GNU Emacs *//p'`; \ - if [ -f "./etc/DOC-$${fullversion}" ]; \ - then \ - docfile="DOC-$${fullversion}"; \ - else \ - docfile="DOC"; \ - fi; \ + docfile="DOC"; \ echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \ ${INSTALL_DATA} etc/$${docfile} $(DESTDIR)${docdir}/$${docfile}; \ $(set_installuser); \ === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-05-14 02:12:19 +0000 +++ admin/ChangeLog 2013-05-15 20:12:53 +0000 @@ -1,3 +1,7 @@ +2013-05-15 Stefan Monnier + + * quick-install-emacs: Don't prune DOC-* files a any more. + 2013-05-14 Glenn Morris * cus-test.el (cus-test-get-lisp-files): Ignore obsolete/. === modified file 'admin/quick-install-emacs' --- admin/quick-install-emacs 2013-01-01 09:11:05 +0000 +++ admin/quick-install-emacs 2013-05-15 20:12:53 +0000 @@ -105,8 +105,8 @@ Optionally, $me can also remove old versions of automatically generated files that are version-specific (such as the -versioned emacs executables in the \`src' directory, and the DOC-* files -in the \`etc' directory). The latter action is called \`pruning,' and +versioned emacs executables in the \`src' directory). +The latter action is called \`pruning,' and can be enabled using the \`-p' or \`--prune' options. EOF exit 0 @@ -209,10 +209,6 @@ PRUNED="" if test x"$PRUNE" != xno; then - for D in `ls -1t $BUILD/etc/DOC-* | sed 1d`; do - echo $REMOVE_CMD $D - PRUNED="$PRUNED $D" - done for D in `ls -1t $BUILD/src/emacs-$VERSION.* | sed 1d`; do echo $REMOVE_CMD $D PRUNED="$PRUNED $D" === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-04-23 18:57:44 +0000 +++ doc/lispref/ChangeLog 2013-05-15 20:12:53 +0000 @@ -1,3 +1,9 @@ +2013-05-15 Stefan Monnier + + * loading.texi (Autoload): + * help.texi (Documentation Basics, Accessing Documentation) + (Accessing Documentation, Accessing Documentation): DOC-* is now DOC. + 2013-04-23 Glenn Morris * internals.texi (Writing Emacs Primitives): Remove obvious example. @@ -24,8 +30,8 @@ 2013-04-06 Chong Yidong * display.texi (Faces): Minor clarifications. - (Defining Faces): Clarify default vs custom face specs. Document - face-spec-set. + (Defining Faces): Clarify default vs custom face specs. + Document face-spec-set. * display.texi (Overlay Properties): * text.texi (Special Properties): Use the "anonymous face" @@ -2050,8 +2056,8 @@ 2012-02-04 Chong Yidong - * functions.texi (What Is a Function): Add closures. Mention - "return value" terminology. Add xref for command-execute. + * functions.texi (What Is a Function): Add closures. + Mention "return value" terminology. Add xref for command-execute. Remove unused "keystroke command" terminology. (Lambda Expressions): Give a different example than in the following subsection. Add xref to Anonymous Functions. @@ -11598,7 +11604,7 @@ 2002-05-13 Kim F. Storm - * variables.texi (Intro to Buffer-Local): Updated warning and + * variables.texi (Intro to Buffer-Local): Update warning and example relating to changing buffer inside let. 2002-03-10 Jan Djärv === modified file 'doc/lispref/help.texi' --- doc/lispref/help.texi 2013-01-01 09:11:05 +0000 +++ doc/lispref/help.texi 2013-05-15 20:12:53 +0000 @@ -93,13 +93,12 @@ (@pxref{Defining Variables}), the documentation is stored in the variable's @code{variable-documentation} property. -@cindex @file{DOC-@var{version}} (documentation) file +@cindex @file{DOC} (documentation) file @item To save memory, the documentation for preloaded functions and variables (including primitive functions and autoloaded functions) is not kept in memory, but in the file -@file{emacs/etc/DOC-@var{version}}, where @var{version} is the Emacs -version number (@pxref{Version Info}). +@file{emacs/etc/DOC}). @item When a function or variable is loaded from a byte-compiled file during @@ -126,7 +125,7 @@ @code{documentation} command, below). If the value recorded in the property list refers to a documentation -string stored in a @file{DOC-@var{version}} file or a byte-compiled +string stored in a @file{DOC} file or a byte-compiled file, it looks up that string and returns it. If the property value isn't @code{nil}, isn't a string, and doesn't refer to text in a file, then it is evaluated as a Lisp expression to obtain a string. @@ -296,12 +295,12 @@ Emacs reads the file @var{filename} from the @file{emacs/etc} directory. When the dumped Emacs is later executed, the same file will be looked for in the directory @code{doc-directory}. Usually @var{filename} is -@code{"DOC-@var{version}"}. +@code{"DOC"}. @end defun @defvar doc-directory This variable holds the name of the directory which should contain the -file @code{"DOC-@var{version}"} that contains documentation strings for +file @code{"DOC"} that contains documentation strings for built-in and preloaded functions and variables. In most cases, this is the same as @code{data-directory}. They may be === modified file 'doc/lispref/loading.texi' --- doc/lispref/loading.texi 2013-01-02 16:13:04 +0000 +++ doc/lispref/loading.texi 2013-05-15 20:12:53 +0000 @@ -483,7 +483,7 @@ @noindent In this case, @code{"prolog"} is the name of the file to load, 169681 refers to the documentation string in the -@file{emacs/etc/DOC-@var{version}} file (@pxref{Documentation Basics}), +@file{emacs/etc/DOC} file (@pxref{Documentation Basics}), @code{t} means the function is interactive, and @code{nil} that it is not a macro or a keymap. @end defun === modified file 'etc/.gitignore' --- etc/.gitignore 2011-01-15 23:16:57 +0000 +++ etc/.gitignore 2013-05-15 20:12:53 +0000 @@ -1,3 +1,2 @@ DOC -DOC-* icons/ === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-05-07 21:34:03 +0000 +++ etc/ChangeLog 2013-05-15 20:12:53 +0000 @@ -1,3 +1,7 @@ +2013-05-15 Stefan Monnier + + * .gitignore: Don't ignore DOC-* any more. + 2013-05-07 Paul Eggert Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295) === modified file 'etc/PROBLEMS' --- etc/PROBLEMS 2013-04-10 01:20:51 +0000 +++ etc/PROBLEMS 2013-05-15 20:12:53 +0000 @@ -551,7 +551,7 @@ *** Self-documentation messages are garbled. -This means that the file `etc/DOC-...' doesn't properly correspond +This means that the file `etc/DOC' doesn't properly correspond with the Emacs executable. Redumping Emacs and then installing the corresponding pair of files should fix the problem. === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2013-05-06 03:32:19 +0000 +++ lib-src/ChangeLog 2013-05-15 20:12:53 +0000 @@ -1,3 +1,7 @@ +2013-05-15 Stefan Monnier + + * makefile.w32-in ($(DOC)): Use DOC rather than DOC-X. + 2013-05-06 Paul Eggert * make-docfile.c (search_lisp_doc_at_eol) [DEBUG]: Fix typo, === modified file 'lib-src/makefile.w32-in' --- lib-src/makefile.w32-in 2013-03-23 15:30:38 +0000 +++ lib-src/makefile.w32-in 2013-05-15 20:12:53 +0000 @@ -292,10 +292,10 @@ "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp1) "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(lisp2) "$(THISDIR)/$(BLD)/make-docfile" -a $(DOC) -d ../src $(OTHER_PLATFORM_SUPPORT) - $(CP) $(DOC) ../etc/DOC-X + $(CP) $(DOC) ../etc/DOC - mkdir "../src/$(OBJDIR)" - mkdir "../src/$(OBJDIR)/etc" - $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC-X + $(CP) $(DOC) ../src/$(OBJDIR)/etc/DOC {$(BLD)}.$(O){$(BLD)}.exe: $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $*.$(O) $(LIBS) === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-15 18:31:51 +0000 +++ lisp/ChangeLog 2013-05-15 20:12:53 +0000 @@ -1,5 +1,7 @@ 2013-05-15 Stefan Monnier + * loadup.el: Just use unversioned DOC. + * nxml/nxml-mode.el: Treat unclosed <[[, + + * sed1x.inp: Don't rewrite DOC any more. + 2013-02-08 Paul Eggert * sedlibmk.inp: Sync with changes in lib/Makefile.in. === modified file 'msdos/sed1x.inp' --- msdos/sed1x.inp 2013-01-01 09:11:05 +0000 +++ msdos/sed1x.inp 2013-05-15 20:12:53 +0000 @@ -17,7 +17,7 @@ # ---------------------------------------------------------------------- s!^ cd \${oldXMenudir}; \${MAKE}.*$! ${MAKE} -C ${oldXMenudir}.! s!^ @true *$! @rem! -s/DOC/DOC-X/g +#s/DOC/DOC-X/g /^OLDXMENU *=/s!=.*!= ${oldXMenudir}libXMenu11.a! /^LIBXMENU *=/s!= *!= ${OLDXMENU}! /^LIBX_OTHER *=/s!= *!= ${LIBXT} ${LIBX_EXTRA}! === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-05-08 15:04:20 +0000 +++ nt/ChangeLog 2013-05-15 20:12:53 +0000 @@ -1,3 +1,7 @@ +2013-05-15 Stefan Monnier + + * makefile.w32-in (clean, top-distclean): DOC-X doesn't exist any more. + 2013-05-08 Juanma Barranquero * config.nt: Sync with autogen/config.in. === modified file 'nt/README.W32' --- nt/README.W32 2013-04-01 07:28:56 +0000 +++ nt/README.W32 2013-05-15 20:12:53 +0000 @@ -29,7 +29,7 @@ Along with this file should be six subdirectories (bin, etc, info, lisp, leim, site-lisp). If you have downloaded the barebin distribution, then it will contain only the bin directory and the - built in documentation in etc/DOC-X, the rest of the subdirectories + built in documentation in etc/DOC, the rest of the subdirectories are in the src distribution, which the barebin distribution is designed to be used with. === modified file 'nt/makefile.w32-in' --- nt/makefile.w32-in 2013-03-27 10:09:44 +0000 +++ nt/makefile.w32-in 2013-05-15 20:12:53 +0000 @@ -313,7 +313,7 @@ - $(DEL) $(COMPILER_TEMP_FILES) - $(DEL_TREE) $(OBJDIR) - $(DEL) stamp_BLD - - $(DEL) ../etc/DOC ../etc/DOC-X + - $(DEL) ../etc/DOC clean-other-dirs-nmake: cd ..\lib @@ -373,7 +373,7 @@ - $(DEL_TREE) oo - $(DEL_TREE) oo-spd - $(DEL) stamp_BLD - - $(DEL) ../etc/DOC ../etc/DOC-X + - $(DEL) ../etc/DOC - $(DEL) config.log Makefile - $(DEL) ../README.W32 === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-15 18:54:49 +0000 +++ src/ChangeLog 2013-05-15 20:12:53 +0000 @@ -1,5 +1,9 @@ 2013-05-15 Stefan Monnier + * makefile.w32-in (DOC): Use just "DOC". + + * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more. + * process.c: Export default filters and sentinels to Elisp. (Qinternal_default_process_sentinel, Qinternal_default_process_filter): New constants. === modified file 'src/Makefile.in' --- src/Makefile.in 2013-05-07 21:34:03 +0000 +++ src/Makefile.in 2013-05-15 20:12:53 +0000 @@ -537,7 +537,7 @@ ## It should remove all files generated during a compilation/bootstrap, ## but not things like config.status or TAGS. bootstrap-clean: clean - rm -f epaths.h config.h config.stamp stamp-h1 stamp-oldxmenu ../etc/DOC-* + rm -f epaths.h config.h config.stamp stamp-h1 stamp-oldxmenu if test -f ./.gdbinit; then \ mv ./.gdbinit ./.gdbinit.save; \ if test -f "$(srcdir)/.gdbinit"; then rm -f ./.gdbinit.save; \ === modified file 'src/doc.c' --- src/doc.c 2013-05-09 18:30:46 +0000 +++ src/doc.c 2013-05-15 20:12:53 +0000 @@ -58,7 +58,7 @@ } /* Extract a doc string from a file. FILEPOS says where to get it. - If it is an integer, use that position in the standard DOC-... file. + If it is an integer, use that position in the standard DOC file. If it is (FILE . INTEGER), use FILE as the file name and INTEGER as the position in that file. But if INTEGER is negative, make it positive. @@ -608,7 +608,7 @@ while (*beg && c_isspace (*beg)) ++beg; for (end = beg; *end && ! c_isspace (*end); ++end) - if (*end == '/') beg = end+1; /* skip directory part */ + if (*end == '/') beg = end + 1; /* Skip directory part. */ len = end - beg; if (len > 4 && end[-4] == '.' && end[-3] == 'o') === modified file 'src/lread.c' --- src/lread.c 2013-05-09 18:30:46 +0000 +++ src/lread.c 2013-05-15 20:12:53 +0000 @@ -3557,7 +3557,7 @@ { if (NILP (Vdoc_file_name)) /* We have not yet called Snarf-documentation, so assume - this file is described in the DOC-MM.NN file + this file is described in the DOC file and Snarf-documentation will fill in the right value later. For now, replace the whole list with 0. */ doc_reference = 1; === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2013-05-08 16:21:19 +0000 +++ src/makefile.w32-in 2013-05-15 20:12:53 +0000 @@ -41,7 +41,7 @@ TLASTLIB = $(BLD)/lastfile.$(A) GNULIB = ../lib/$(BLD)/libgnu.$(A) -DOC = $(OBJDIR)/etc/DOC-X +DOC = $(OBJDIR)/etc/DOC FULL_LINK_FLAGS = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK) ------------------------------------------------------------ revno: 112591 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2013-05-15 14:54:49 -0400 message: * src/process.c: Export default filters and sentinels to Elisp. (Qinternal_default_process_sentinel, Qinternal_default_process_filter): New constants. (pset_filter, pset_sentinel, make_process, Fset_process_filter) (Fset_process_sentinel, Fformat_network_address): Default to them instead of nil. (server_accept_connection): Sentinels can't be nil any more. (read_and_dispose_of_process_output): New function, extracted from read_process_output. (read_process_output): Use it; filters can't be nil. (Finternal_default_process_filter): New function, extracted from read_process_output. (exec_sentinel_unwind): Remove function. (exec_sentinel): Don't zilch sentinel while running. (status_notify): Sentinels can't be nil. (Finternal_default_process_sentinel): New function extracted from status_notify. (setup_process_coding_systems): Default filter is not nil any more. (syms_of_process): Export new Elisp functions and initialize new constants. * src/lisp.h (make_lisp_proc): New function. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-05-14 02:04:02 +0000 +++ etc/NEWS 2013-05-15 18:54:49 +0000 @@ -327,6 +327,9 @@ * Incompatible Lisp Changes in Emacs 24.4 +** Default process filers and sentinels are not nil any more. +Instead they default to a function which does what the nil value used to do. + ** `read-event' does not return decoded chars in ttys any more. Just as was the case in Emacs-22 and before, decoding of tty input according to keyboard-coding-system is not performed in read-event any more. But contrary === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-15 00:52:07 +0000 +++ src/ChangeLog 2013-05-15 18:54:49 +0000 @@ -1,5 +1,29 @@ 2013-05-15 Stefan Monnier + * process.c: Export default filters and sentinels to Elisp. + (Qinternal_default_process_sentinel, Qinternal_default_process_filter): + New constants. + (pset_filter, pset_sentinel, make_process, Fset_process_filter) + (Fset_process_sentinel, Fformat_network_address): + Default to them instead of nil. + (server_accept_connection): Sentinels can't be nil any more. + (read_and_dispose_of_process_output): New function, extracted from + read_process_output. + (read_process_output): Use it; filters can't be nil. + (Finternal_default_process_filter): New function, extracted from + read_process_output. + (exec_sentinel_unwind): Remove function. + (exec_sentinel): Don't zilch sentinel while running. + (status_notify): Sentinels can't be nil. + (Finternal_default_process_sentinel): New function extracted from + status_notify. + (setup_process_coding_systems): Default filter is not nil any more. + (syms_of_process): Export new Elisp functions and initialize + new constants. + * lisp.h (make_lisp_proc): New function. + +2013-05-15 Stefan Monnier + * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart. 2013-05-14 Eli Zaretskii === modified file 'src/lisp.h' --- src/lisp.h 2013-04-26 19:31:09 +0000 +++ src/lisp.h 2013-05-15 18:54:49 +0000 @@ -585,10 +585,12 @@ (eassert (KBOARD_OBJFWDP (a)), &((a)->u_kboard_objfwd)) /* Pseudovector types. */ - +struct Lisp_Process; +LISP_INLINE Lisp_Object make_lisp_proc (struct Lisp_Process *p) +{ return make_lisp_ptr (p, Lisp_Vectorlike); } #define XPROCESS(a) (eassert (PROCESSP (a)), \ (struct Lisp_Process *) XUNTAG (a, Lisp_Vectorlike)) -#define XWINDOW(a) (eassert (WINDOWP (a)), \ +#define XWINDOW(a) (eassert (WINDOWP (a)), \ (struct window *) XUNTAG (a, Lisp_Vectorlike)) #define XTERMINAL(a) (eassert (TERMINALP (a)), \ (struct terminal *) XUNTAG (a, Lisp_Vectorlike)) === modified file 'src/process.c' --- src/process.c 2013-04-02 01:54:56 +0000 +++ src/process.c 2013-05-15 18:54:49 +0000 @@ -174,6 +174,8 @@ static Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; static Lisp_Object QCsentinel, QClog, QCoptions, QCplist; static Lisp_Object Qlast_nonmenu_event; +static Lisp_Object Qinternal_default_process_sentinel; +static Lisp_Object Qinternal_default_process_filter; #define NETCONN_P(p) (EQ (XPROCESS (p)->type, Qnetwork)) #define NETCONN1_P(p) (EQ (p->type, Qnetwork)) @@ -359,7 +361,7 @@ static void pset_filter (struct Lisp_Process *p, Lisp_Object val) { - p->filter = val; + p->filter = NILP (val) ? Qinternal_default_process_filter : val; } static void pset_log (struct Lisp_Process *p, Lisp_Object val) @@ -384,7 +386,7 @@ static void pset_sentinel (struct Lisp_Process *p, Lisp_Object val) { - p->sentinel = val; + p->sentinel = NILP (val) ? Qinternal_default_process_sentinel : val; } static void pset_status (struct Lisp_Process *p, Lisp_Object val) @@ -700,6 +702,8 @@ } name = name1; pset_name (p, name); + pset_sentinel (p, Qinternal_default_process_sentinel); + pset_filter (p, Qinternal_default_process_filter); XSETPROCESS (val, p); Vprocess_alist = Fcons (Fcons (name, val), Vprocess_alist); return val; @@ -979,10 +983,10 @@ DEFUN ("set-process-filter", Fset_process_filter, Sset_process_filter, 2, 2, 0, - doc: /* Give PROCESS the filter function FILTER; nil means no filter. + doc: /* Give PROCESS the filter function FILTER; nil means default. A value of t means stop accepting output from the process. -When a process has a filter, its buffer is not used for output. +When a process has a non-default filter, its buffer is not used for output. Instead, each time it does output, the entire string of output is passed to the filter. @@ -1008,6 +1012,9 @@ (debug) (set-process-filter process ...) */ + if (NILP (filter)) + filter = Qinternal_default_process_filter; + if (p->infd >= 0) { if (EQ (filter, Qt) && !EQ (p->status, Qlisten)) @@ -1033,7 +1040,7 @@ DEFUN ("process-filter", Fprocess_filter, Sprocess_filter, 1, 1, 0, - doc: /* Returns the filter function of PROCESS; nil if none. + doc: /* Return the filter function of PROCESS. See `set-process-filter' for more info on filter functions. */) (register Lisp_Object process) { @@ -1043,7 +1050,7 @@ DEFUN ("set-process-sentinel", Fset_process_sentinel, Sset_process_sentinel, 2, 2, 0, - doc: /* Give PROCESS the sentinel SENTINEL; nil for none. + doc: /* Give PROCESS the sentinel SENTINEL; nil for default. The sentinel is called as a function when the process changes state. It gets two arguments: the process, and a string describing the change. */) (register Lisp_Object process, Lisp_Object sentinel) @@ -1053,6 +1060,9 @@ CHECK_PROCESS (process); p = XPROCESS (process); + if (NILP (sentinel)) + sentinel = Qinternal_default_process_sentinel; + pset_sentinel (p, sentinel); if (NETCONN1_P (p) || SERIALCONN1_P (p)) pset_childp (p, Fplist_put (p->childp, QCsentinel, sentinel)); @@ -1061,7 +1071,7 @@ DEFUN ("process-sentinel", Fprocess_sentinel, Sprocess_sentinel, 1, 1, 0, - doc: /* Return the sentinel of PROCESS; nil if none. + doc: /* Return the sentinel of PROCESS. See `set-process-sentinel' for more info on sentinels. */) (register Lisp_Object process) { @@ -1378,8 +1388,8 @@ pset_plist (XPROCESS (proc), Qnil); pset_type (XPROCESS (proc), Qreal); pset_buffer (XPROCESS (proc), buffer); - pset_sentinel (XPROCESS (proc), Qnil); - pset_filter (XPROCESS (proc), Qnil); + pset_sentinel (XPROCESS (proc), Qinternal_default_process_sentinel); + pset_filter (XPROCESS (proc), Qinternal_default_process_filter); pset_command (XPROCESS (proc), Flist (nargs - 2, args + 2)); #ifdef HAVE_GNUTLS @@ -4039,7 +4049,8 @@ process name of the server process concatenated with the caller identification. */ - if (!NILP (ps->filter) && !EQ (ps->filter, Qt)) + if (!(EQ (ps->filter, Qinternal_default_process_filter) + || EQ (ps->filter, Qt))) buffer = Qnil; else { @@ -4108,7 +4119,7 @@ /* Setup coding system for new process based on server process. This seems to be the proper thing to do, as the coding system of the new process should reflect the settings at the time the - server socket was opened; not the current settings. */ + server socket was opened; not the current settings. */ pset_decode_coding_system (p, ps->decode_coding_system); pset_encode_coding_system (p, ps->encode_coding_system); @@ -4127,11 +4138,10 @@ (STRINGP (host) ? host : build_string ("-")), build_string ("\n"))); - if (!NILP (p->sentinel)) - exec_sentinel (proc, - concat3 (build_string ("open from "), - (STRINGP (host) ? host : build_string ("-")), - build_string ("\n"))); + exec_sentinel (proc, + concat3 (build_string ("open from "), + (STRINGP (host) ? host : build_string ("-")), + build_string ("\n"))); } /* This variable is different from waiting_for_input in keyboard.c. @@ -4263,8 +4273,8 @@ if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) break; - /* Compute time from now till when time limit is up */ - /* Exit if already run out */ + /* Compute time from now till when time limit is up. */ + /* Exit if already run out. */ if (nsecs < 0) { /* A negative timeout means @@ -4871,8 +4881,8 @@ } } #endif /* NON_BLOCKING_CONNECT */ - } /* end for each file descriptor */ - } /* end while exit conditions not met */ + } /* End for each file descriptor. */ + } /* End while exit conditions not met. */ unbind_to (count, Qnil); @@ -4907,6 +4917,11 @@ return Qt; } +static void +read_and_dispose_of_process_output (struct Lisp_Process *p, char *chars, + ssize_t nbytes, + struct coding_system *coding); + /* Read pending output from the process channel, starting with our buffered-ahead character if we have one. Yield number of decoded characters read. @@ -4923,9 +4938,7 @@ { register ssize_t nbytes; char *chars; - register Lisp_Object outstream; register struct Lisp_Process *p = XPROCESS (proc); - register ptrdiff_t opoint; struct coding_system *coding = proc_decode_coding_system[channel]; int carryover = p->decoding_carryover; int readmax = 4096; @@ -5013,122 +5026,144 @@ friends don't expect current-buffer to be changed from under them. */ record_unwind_current_buffer (); - /* Read and dispose of the process output. */ - outstream = p->filter; - if (!NILP (outstream)) - { - Lisp_Object text; - bool outer_running_asynch_code = running_asynch_code; - int waiting = waiting_for_user_input_p; - - /* No need to gcpro these, because all we do with them later - is test them for EQness, and none of them should be a string. */ + read_and_dispose_of_process_output (p, chars, nbytes, coding); + + /* Handling the process output should not deactivate the mark. */ + Vdeactivate_mark = odeactivate; + + unbind_to (count, Qnil); + return nbytes; +} + +static void +read_and_dispose_of_process_output (struct Lisp_Process *p, char *chars, + ssize_t nbytes, + struct coding_system *coding) +{ + Lisp_Object outstream = p->filter; + Lisp_Object text; + bool outer_running_asynch_code = running_asynch_code; + int waiting = waiting_for_user_input_p; + + /* No need to gcpro these, because all we do with them later + is test them for EQness, and none of them should be a string. */ #if 0 - Lisp_Object obuffer, okeymap; - XSETBUFFER (obuffer, current_buffer); - okeymap = BVAR (current_buffer, keymap); + Lisp_Object obuffer, okeymap; + XSETBUFFER (obuffer, current_buffer); + okeymap = BVAR (current_buffer, keymap); #endif - /* We inhibit quit here instead of just catching it so that - hitting ^G when a filter happens to be running won't screw - it up. */ - specbind (Qinhibit_quit, Qt); - specbind (Qlast_nonmenu_event, Qt); - - /* In case we get recursively called, - and we already saved the match data nonrecursively, - save the same match data in safely recursive fashion. */ - if (outer_running_asynch_code) - { - Lisp_Object tem; - /* Don't clobber the CURRENT match data, either! */ - tem = Fmatch_data (Qnil, Qnil, Qnil); - restore_search_regs (); - record_unwind_save_match_data (); - Fset_match_data (tem, Qt); - } - - /* For speed, if a search happens within this code, - save the match data in a special nonrecursive fashion. */ - running_asynch_code = 1; - - decode_coding_c_string (coding, (unsigned char *) chars, nbytes, Qt); - text = coding->dst_object; - Vlast_coding_system_used = CODING_ID_NAME (coding->id); - /* A new coding system might be found. */ - if (!EQ (p->decode_coding_system, Vlast_coding_system_used)) - { - pset_decode_coding_system (p, Vlast_coding_system_used); - - /* Don't call setup_coding_system for - proc_decode_coding_system[channel] here. It is done in - detect_coding called via decode_coding above. */ - - /* If a coding system for encoding is not yet decided, we set - it as the same as coding-system for decoding. - - But, before doing that we must check if - proc_encode_coding_system[p->outfd] surely points to a - valid memory because p->outfd will be changed once EOF is - sent to the process. */ - if (NILP (p->encode_coding_system) - && proc_encode_coding_system[p->outfd]) - { - pset_encode_coding_system - (p, coding_inherit_eol_type (Vlast_coding_system_used, Qnil)); - setup_coding_system (p->encode_coding_system, - proc_encode_coding_system[p->outfd]); - } - } - - if (coding->carryover_bytes > 0) - { - if (SCHARS (p->decoding_buf) < coding->carryover_bytes) - pset_decoding_buf (p, make_uninit_string (coding->carryover_bytes)); - memcpy (SDATA (p->decoding_buf), coding->carryover, - coding->carryover_bytes); - p->decoding_carryover = coding->carryover_bytes; - } - if (SBYTES (text) > 0) - /* FIXME: It's wrong to wrap or not based on debug-on-error, and - sometimes it's simply wrong to wrap (e.g. when called from - accept-process-output). */ - internal_condition_case_1 (read_process_output_call, - Fcons (outstream, - Fcons (proc, Fcons (text, Qnil))), - !NILP (Vdebug_on_error) ? Qnil : Qerror, - read_process_output_error_handler); - - /* If we saved the match data nonrecursively, restore it now. */ + /* We inhibit quit here instead of just catching it so that + hitting ^G when a filter happens to be running won't screw + it up. */ + specbind (Qinhibit_quit, Qt); + specbind (Qlast_nonmenu_event, Qt); + + /* In case we get recursively called, + and we already saved the match data nonrecursively, + save the same match data in safely recursive fashion. */ + if (outer_running_asynch_code) + { + Lisp_Object tem; + /* Don't clobber the CURRENT match data, either! */ + tem = Fmatch_data (Qnil, Qnil, Qnil); restore_search_regs (); - running_asynch_code = outer_running_asynch_code; - - /* Restore waiting_for_user_input_p as it was - when we were called, in case the filter clobbered it. */ - waiting_for_user_input_p = waiting; + record_unwind_save_match_data (); + Fset_match_data (tem, Qt); + } + + /* For speed, if a search happens within this code, + save the match data in a special nonrecursive fashion. */ + running_asynch_code = 1; + + decode_coding_c_string (coding, (unsigned char *) chars, nbytes, Qt); + text = coding->dst_object; + Vlast_coding_system_used = CODING_ID_NAME (coding->id); + /* A new coding system might be found. */ + if (!EQ (p->decode_coding_system, Vlast_coding_system_used)) + { + pset_decode_coding_system (p, Vlast_coding_system_used); + + /* Don't call setup_coding_system for + proc_decode_coding_system[channel] here. It is done in + detect_coding called via decode_coding above. */ + + /* If a coding system for encoding is not yet decided, we set + it as the same as coding-system for decoding. + + But, before doing that we must check if + proc_encode_coding_system[p->outfd] surely points to a + valid memory because p->outfd will be changed once EOF is + sent to the process. */ + if (NILP (p->encode_coding_system) + && proc_encode_coding_system[p->outfd]) + { + pset_encode_coding_system + (p, coding_inherit_eol_type (Vlast_coding_system_used, Qnil)); + setup_coding_system (p->encode_coding_system, + proc_encode_coding_system[p->outfd]); + } + } + + if (coding->carryover_bytes > 0) + { + if (SCHARS (p->decoding_buf) < coding->carryover_bytes) + pset_decoding_buf (p, make_uninit_string (coding->carryover_bytes)); + memcpy (SDATA (p->decoding_buf), coding->carryover, + coding->carryover_bytes); + p->decoding_carryover = coding->carryover_bytes; + } + if (SBYTES (text) > 0) + /* FIXME: It's wrong to wrap or not based on debug-on-error, and + sometimes it's simply wrong to wrap (e.g. when called from + accept-process-output). */ + internal_condition_case_1 (read_process_output_call, + Fcons (outstream, + Fcons (make_lisp_proc (p), + Fcons (text, Qnil))), + !NILP (Vdebug_on_error) ? Qnil : Qerror, + read_process_output_error_handler); + + /* If we saved the match data nonrecursively, restore it now. */ + restore_search_regs (); + running_asynch_code = outer_running_asynch_code; + + /* Restore waiting_for_user_input_p as it was + when we were called, in case the filter clobbered it. */ + waiting_for_user_input_p = waiting; #if 0 /* Call record_asynch_buffer_change unconditionally, because we might have changed minor modes or other things that affect key bindings. */ - if (! EQ (Fcurrent_buffer (), obuffer) - || ! EQ (current_buffer->keymap, okeymap)) + if (! EQ (Fcurrent_buffer (), obuffer) + || ! EQ (current_buffer->keymap, okeymap)) #endif - /* But do it only if the caller is actually going to read events. - Otherwise there's no need to make him wake up, and it could - cause trouble (for example it would make sit_for return). */ - if (waiting_for_user_input_p == -1) - record_asynch_buffer_change (); - } - - /* If no filter, write into buffer if it isn't dead. */ - else if (!NILP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer))) + /* But do it only if the caller is actually going to read events. + Otherwise there's no need to make him wake up, and it could + cause trouble (for example it would make sit_for return). */ + if (waiting_for_user_input_p == -1) + record_asynch_buffer_change (); +} + +DEFUN ("internal-default-process-filter", Finternal_default_process_filter, + Sinternal_default_process_filter, 2, 2, 0, + doc: /* Function used as default process filter. */) + (Lisp_Object proc, Lisp_Object text) +{ + struct Lisp_Process *p; + ptrdiff_t opoint; + + CHECK_PROCESS (proc); + p = XPROCESS (proc); + CHECK_STRING (text); + + if (!NILP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer))) { Lisp_Object old_read_only; ptrdiff_t old_begv, old_zv; ptrdiff_t old_begv_byte, old_zv_byte; ptrdiff_t before, before_byte; ptrdiff_t opoint_byte; - Lisp_Object text; struct buffer *b; Fset_buffer (p->buffer); @@ -5161,31 +5196,6 @@ if (! (BEGV <= PT && PT <= ZV)) Fwiden (); - decode_coding_c_string (coding, (unsigned char *) chars, nbytes, Qt); - text = coding->dst_object; - Vlast_coding_system_used = CODING_ID_NAME (coding->id); - /* A new coding system might be found. See the comment in the - similar code in the previous `if' block. */ - if (!EQ (p->decode_coding_system, Vlast_coding_system_used)) - { - pset_decode_coding_system (p, Vlast_coding_system_used); - if (NILP (p->encode_coding_system) - && proc_encode_coding_system[p->outfd]) - { - pset_encode_coding_system - (p, coding_inherit_eol_type (Vlast_coding_system_used, Qnil)); - setup_coding_system (p->encode_coding_system, - proc_encode_coding_system[p->outfd]); - } - } - if (coding->carryover_bytes > 0) - { - if (SCHARS (p->decoding_buf) < coding->carryover_bytes) - pset_decoding_buf (p, make_uninit_string (coding->carryover_bytes)); - memcpy (SDATA (p->decoding_buf), coding->carryover, - coding->carryover_bytes); - p->decoding_carryover = coding->carryover_bytes; - } /* Adjust the multibyteness of TEXT to that of the buffer. */ if (NILP (BVAR (current_buffer, enable_multibyte_characters)) != ! STRING_MULTIBYTE (text)) @@ -5230,18 +5240,13 @@ if (old_begv != BEGV || old_zv != ZV) Fnarrow_to_region (make_number (old_begv), make_number (old_zv)); - bset_read_only (current_buffer, old_read_only); SET_PT_BOTH (opoint, opoint_byte); } - /* Handling the process output should not deactivate the mark. */ - Vdeactivate_mark = odeactivate; - - unbind_to (count, Qnil); - return nbytes; + return Qnil; } -/* Sending data to subprocess */ +/* Sending data to subprocess. */ /* In send_process, when a write fails temporarily, wait_reading_process_output is called. It may execute user code, @@ -6188,13 +6193,6 @@ static Lisp_Object -exec_sentinel_unwind (Lisp_Object data) -{ - pset_sentinel (XPROCESS (XCAR (data)), XCDR (data)); - return Qnil; -} - -static Lisp_Object exec_sentinel_error_handler (Lisp_Object error_val) { cmd_error_internal (error_val, "error in process sentinel: "); @@ -6231,13 +6229,7 @@ record_unwind_current_buffer (); sentinel = p->sentinel; - if (NILP (sentinel)) - return; - /* Zilch the sentinel while it's running, to avoid recursive invocations; - assure that it gets restored no matter how the sentinel exits. */ - pset_sentinel (p, Qnil); - record_unwind_protect (exec_sentinel_unwind, Fcons (proc, sentinel)); /* Inhibit quit so that random quits don't screw up a running filter. */ specbind (Qinhibit_quit, Qt); specbind (Qlast_nonmenu_event, Qt); /* Why? --Stef */ @@ -6295,7 +6287,7 @@ static void status_notify (struct Lisp_Process *deleting_process) { - register Lisp_Object proc, buffer; + register Lisp_Object proc; Lisp_Object tail, msg; struct gcpro gcpro1, gcpro2; @@ -6333,8 +6325,6 @@ && p != deleting_process && read_process_output (proc, p->infd) > 0); - buffer = p->buffer; - /* Get the text to use for the message. */ if (p->raw_status_new) update_status (p); @@ -6355,66 +6345,83 @@ } /* The actions above may have further incremented p->tick. - So set p->update_tick again - so that an error in the sentinel will not cause - this code to be run again. */ + So set p->update_tick again so that an error in the sentinel will + not cause this code to be run again. */ p->update_tick = p->tick; /* Now output the message suitably. */ - if (!NILP (p->sentinel)) - exec_sentinel (proc, msg); - /* Don't bother with a message in the buffer - when a process becomes runnable. */ - else if (!EQ (symbol, Qrun) && !NILP (buffer)) - { - Lisp_Object tem; - struct buffer *old = current_buffer; - ptrdiff_t opoint, opoint_byte; - ptrdiff_t before, before_byte; - - /* Avoid error if buffer is deleted - (probably that's why the process is dead, too) */ - if (!BUFFER_LIVE_P (XBUFFER (buffer))) - continue; - Fset_buffer (buffer); - - opoint = PT; - opoint_byte = PT_BYTE; - /* Insert new output into buffer - at the current end-of-output marker, - thus preserving logical ordering of input and output. */ - if (XMARKER (p->mark)->buffer) - Fgoto_char (p->mark); - else - SET_PT_BOTH (ZV, ZV_BYTE); - - before = PT; - before_byte = PT_BYTE; - - tem = BVAR (current_buffer, read_only); - bset_read_only (current_buffer, Qnil); - insert_string ("\nProcess "); - { /* FIXME: temporary kludge */ - Lisp_Object tem2 = p->name; Finsert (1, &tem2); } - insert_string (" "); - Finsert (1, &msg); - bset_read_only (current_buffer, tem); - set_marker_both (p->mark, p->buffer, PT, PT_BYTE); - - if (opoint >= before) - SET_PT_BOTH (opoint + (PT - before), - opoint_byte + (PT_BYTE - before_byte)); - else - SET_PT_BOTH (opoint, opoint_byte); - - set_buffer_internal (old); - } + exec_sentinel (proc, msg); } } /* end for */ - update_mode_lines++; /* in case buffers use %s in mode-line-format */ + update_mode_lines++; /* In case buffers use %s in mode-line-format. */ UNGCPRO; } +DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel, + Sinternal_default_process_sentinel, 2, 2, 0, + doc: /* Function used as default sentinel for processes. */) + (Lisp_Object proc, Lisp_Object msg) +{ + Lisp_Object buffer, symbol; + struct Lisp_Process *p; + CHECK_PROCESS (proc); + p = XPROCESS (proc); + buffer = p->buffer; + symbol = p->status; + if (CONSP (symbol)) + symbol = XCAR (symbol); + + if (!EQ (symbol, Qrun) && !NILP (buffer)) + { + Lisp_Object tem; + struct buffer *old = current_buffer; + ptrdiff_t opoint, opoint_byte; + ptrdiff_t before, before_byte; + + /* Avoid error if buffer is deleted + (probably that's why the process is dead, too). */ + if (!BUFFER_LIVE_P (XBUFFER (buffer))) + return Qnil; + Fset_buffer (buffer); + + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) + msg = (code_convert_string_norecord + (msg, Vlocale_coding_system, 1)); + + opoint = PT; + opoint_byte = PT_BYTE; + /* Insert new output into buffer + at the current end-of-output marker, + thus preserving logical ordering of input and output. */ + if (XMARKER (p->mark)->buffer) + Fgoto_char (p->mark); + else + SET_PT_BOTH (ZV, ZV_BYTE); + + before = PT; + before_byte = PT_BYTE; + + tem = BVAR (current_buffer, read_only); + bset_read_only (current_buffer, Qnil); + insert_string ("\nProcess "); + { /* FIXME: temporary kludge. */ + Lisp_Object tem2 = p->name; Finsert (1, &tem2); } + insert_string (" "); + Finsert (1, &msg); + bset_read_only (current_buffer, tem); + set_marker_both (p->mark, p->buffer, PT, PT_BYTE); + + if (opoint >= before) + SET_PT_BOTH (opoint + (PT - before), + opoint_byte + (PT_BYTE - before_byte)); + else + SET_PT_BOTH (opoint, opoint_byte); + + set_buffer_internal (old); + } + return Qnil; +} + DEFUN ("set-process-coding-system", Fset_process_coding_system, Sset_process_coding_system, 1, 3, 0, @@ -6606,13 +6613,13 @@ if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) break; - /* Compute time from now till when time limit is up */ - /* Exit if already run out */ + /* Compute time from now till when time limit is up. */ + /* Exit if already run out. */ if (nsecs < 0) { /* A negative timeout means gobble output available now - but don't wait at all. */ + but don't wait at all. */ timeout = make_emacs_time (0, 0); } @@ -6805,9 +6812,8 @@ if (!proc_decode_coding_system[inch]) proc_decode_coding_system[inch] = xmalloc (sizeof (struct coding_system)); coding_system = p->decode_coding_system; - if (! NILP (p->filter)) - ; - else if (BUFFERP (p->buffer)) + if (EQ (p->filter, Qinternal_default_process_filter) + && BUFFERP (p->buffer)) { if (NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters))) coding_system = raw_text_coding_system (coding_system); @@ -6916,7 +6922,7 @@ DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p, 0, 0, 0, - doc: /* Returns non-nil if Emacs is waiting for input from the user. + doc: /* Return non-nil if Emacs is waiting for input from the user. This is intended for use by asynchronous process output filters and sentinels. */) (void) { @@ -7222,6 +7228,10 @@ DEFSYM (Qcutime, "cutime"); DEFSYM (Qcstime, "cstime"); DEFSYM (Qctime, "ctime"); + DEFSYM (Qinternal_default_process_sentinel, + "internal-default-process-sentinel"); + DEFSYM (Qinternal_default_process_filter, + "internal-default-process-filter"); DEFSYM (Qpri, "pri"); DEFSYM (Qnice, "nice"); DEFSYM (Qthcount, "thcount"); @@ -7317,6 +7327,8 @@ defsubr (&Ssignal_process); defsubr (&Swaiting_for_user_input_p); defsubr (&Sprocess_type); + defsubr (&Sinternal_default_process_sentinel); + defsubr (&Sinternal_default_process_filter); defsubr (&Sset_process_coding_system); defsubr (&Sprocess_coding_system); defsubr (&Sset_process_filter_multibyte); ------------------------------------------------------------ revno: 112590 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2013-05-15 14:31:51 -0400 message: * lisp/nxml/nxml-mode.el: Treat unclosed <[[, + + * nxml/nxml-mode.el: Treat unclosed <[[, - * progmodes/octave.el (octave-goto-function-definition): Improve - and fix callers. + * progmodes/octave.el (octave-goto-function-definition): + Improve and fix callers. 2013-05-15 Stefan Monnier @@ -277,7 +304,8 @@ their declaration. (vhdl-mode-syntax-table-init): Remove. - * progmodes/m4-mode.el (m4-mode-syntax-table): Add comment on last change. + * progmodes/m4-mode.el (m4-mode-syntax-table): Add comment on + last change. * progmodes/ld-script.el (ld-script-mode-syntax-table): Use symbol syntax for "_". @@ -292,7 +320,8 @@ Handle a _ with symbol syntax. (autoconf-mode): Don't change the syntax-table for imenu and font-lock. - * progmodes/ada-mode.el (ada-mode-abbrev-table): Consolidate declaration. + * progmodes/ada-mode.el (ada-mode-abbrev-table): + Consolidate declaration. (ada-mode-syntax-table, ada-mode-symbol-syntax-table): Initialize in the declaration. (ada-create-syntax-table): Remove. === modified file 'lisp/nxml/nxml-mode.el' --- lisp/nxml/nxml-mode.el 2013-03-23 02:21:25 +0000 +++ lisp/nxml/nxml-mode.el 2013-05-15 18:31:51 +0000 @@ -352,11 +352,6 @@ See the function `xmltok-forward-prolog' for more information.") (make-variable-buffer-local 'nxml-prolog-regions) -(defvar nxml-last-fontify-end nil - "Position where fontification last ended. -It is nil if the buffer changed since the last fontification.") -(make-variable-buffer-local 'nxml-last-fontify-end) - (defvar nxml-degraded nil "Non-nil if currently operating in degraded mode. Degraded mode is enabled when an internal error is encountered in the @@ -538,7 +533,6 @@ (save-excursion (save-restriction (widen) - (nxml-clear-dependent-regions (point-min) (point-max)) (setq nxml-scan-end (copy-marker (point-min) nil)) (with-silent-modifications (nxml-clear-inside (point-min) (point-max)) @@ -583,12 +577,9 @@ ;; Clean up fontification. (save-excursion (widen) - (let ((inhibit-read-only t) - (buffer-undo-list t) - (modified (buffer-modified-p))) + (with-silent-modifications (nxml-with-invisible-motion - (remove-text-properties (point-min) (point-max) '(face))) - (set-buffer-modified-p modified))) + (remove-text-properties (point-min) (point-max) '(face))))) (remove-hook 'change-major-mode-hook 'nxml-cleanup t)) (defun nxml-degrade (context err) @@ -638,10 +629,6 @@ For bookkeeping, call this function even when fontification is disabled." (let ((pre-change-end (+ start pre-change-length))) - (setq start - (nxml-adjust-start-for-dependent-regions start - end - pre-change-length)) ;; If the prolog might have changed, rescan the prolog (when (<= start ;; Add 2 so as to include the < and following char that @@ -902,26 +889,16 @@ (defun nxml-extend-after-change-region (start end pre-change-length) (unless nxml-degraded - (setq nxml-last-fontify-end nil) - (let ((region (nxml-with-degradation-on-error - 'nxml-extend-after-change-region - (save-excursion - (save-restriction - (widen) - (save-match-data - (nxml-with-invisible-motion - (with-silent-modifications - (nxml-extend-after-change-region1 - start end pre-change-length))))))))) - (if (consp region) region)))) - -(defun nxml-extend-after-change-region1 (start end pre-change-length) - (let* ((region (nxml-after-change1 start end pre-change-length)) - (font-lock-beg (car region)) - (font-lock-end (cdr region))) - - (nxml-extend-region) - (cons font-lock-beg font-lock-end))) + (nxml-with-degradation-on-error + 'nxml-extend-after-change-region + (save-excursion + (save-restriction + (widen) + (save-match-data + (nxml-with-invisible-motion + (with-silent-modifications + (nxml-after-change1 + start end pre-change-length))))))))) (defun nxml-fontify-matcher (bound) "Called as font-lock keyword matcher." @@ -936,13 +913,12 @@ (nxml-fontify-prolog) (goto-char nxml-prolog-end)) - (let (xmltok-dependent-regions - xmltok-errors) + (let (xmltok-errors) (while (and (nxml-tokenize-forward) (<= (point) bound)) ; Intervals are open-ended. (nxml-apply-fontify-rule))) - (setq nxml-last-fontify-end (point))) + ) ;; Since we did the fontification internally, tell font-lock to not ;; do anything itself. === modified file 'lisp/nxml/nxml-rap.el' --- lisp/nxml/nxml-rap.el 2013-03-23 02:21:25 +0000 +++ lisp/nxml/nxml-rap.el 2013-05-15 18:31:51 +0000 @@ -69,18 +69,6 @@ ;; typical proportion of comments, CDATA sections and processing ;; instructions is small relative to other things. Secondly, to scan ;; we just search for the regexp <[!?]. -;; -;; One problem is unclosed comments, processing instructions and CDATA -;; sections. Suppose, for example, we encounter a . This is not an unexpected situation if the user is -;; creating a comment. It is not helpful to treat the whole of the -;; file starting from the gets added to the buffer after the unclosed ") - (xmltok-add-dependent 'xmltok-unclosed-reparse-p - nil - nil - ;; not --> because - ;; -- is not allowed - ;; in comments in XML - "--") - 'not-well-formed) - ((eq (char-after) ?>) - (goto-char (1+ (point))) - 'comment) - (t - (xmltok-add-dependent - 'xmltok-semi-closed-reparse-p - nil - (point) - "--" - 2) - ;; just include the