Now on revision 105764. ------------------------------------------------------------ revno: 105764 committer: martin rudalics branch nick: trunk timestamp: Wed 2011-09-14 11:17:30 +0200 message: Replace display-buffer-window by help-setup window parameter. * window.el (display-buffer-window): Remove. (display-buffer-record-window): Use help-setup window parameter instead of variable display-buffer-window. (display-buffer-function, special-display-buffer-names) (special-display-function): Mention help-setup parameter instead of display-buffer-window in doc-string. * help.el (help-window-setup): New argument help-window. Use help-window-setup parameter instead of display-buffer-window. Reword some messages. (with-help-window): Pass window used for displaying the buffer to help-window-setup. Don't set display-buffer-window. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-13 23:42:21 +0000 +++ lisp/ChangeLog 2011-09-14 09:17:30 +0000 @@ -1,3 +1,17 @@ +2011-09-14 Martin Rudalics + + * window.el (display-buffer-window): Remove. + (display-buffer-record-window): Use help-setup window parameter + instead of variable display-buffer-window. + (display-buffer-function, special-display-buffer-names) + (special-display-function): Mention help-setup parameter instead + of display-buffer-window in doc-string. + * help.el (help-window-setup): New argument help-window. Use + help-window-setup parameter instead of display-buffer-window. + Reword some messages. + (with-help-window): Pass window used for displaying the buffer + to help-window-setup. Don't set display-buffer-window. + 2011-09-13 Glenn Morris * emacs-lisp/debug.el (debugger-make-xrefs): === modified file 'lisp/help.el' --- lisp/help.el 2011-09-13 07:22:05 +0000 +++ lisp/help.el 2011-09-14 09:17:30 +0000 @@ -1060,14 +1060,13 @@ (message "%s" (substitute-command-keys (concat quit-part scroll-part))))) -(defun help-window-setup () +(defun help-window-setup (help-window) "Set up help window for `with-help-window'. -This relies on `display-buffer-window' being correctly set up by -`display-buffer'." - (let* ((help-window (car-safe display-buffer-window)) - (help-buffer (when (window-live-p help-window) +HELP-WINDOW is the window used for displaying the help buffer." + (let* ((help-buffer (when (window-live-p help-window) (window-buffer help-window))) - (help-value (cdr-safe display-buffer-window))) + (help-setup (when (window-live-p help-window) + (window-parameter help-window 'help-setup)))) (when help-buffer ;; Handle `help-window-point-marker'. (when (eq (marker-buffer help-window-point-marker) help-buffer) @@ -1078,6 +1077,7 @@ (cond ((or (eq help-window (selected-window)) (and (or (eq help-window-select t) + (eq help-setup 'new-frame) (and (eq help-window-select 'other) (eq (window-frame help-window) (selected-frame)) (> (length (window-list nil 'no-mini)) 2))) @@ -1085,13 +1085,12 @@ ;; The help window is or gets selected ... (help-window-display-message (cond - ((eq help-value 'new-window) + ((eq help-setup 'new-window) ;; ... and is new, ... - "Type \"q\" to delete this window") - ((eq help-value 'new-frame) - ;; ... is on a new frame ... - "Type \"q\" to delete this frame") - ((eq help-value 'reuse-other-window) + "Type \"q\" to delete help window") + ((eq help-setup 'new-frame) + "Type \"q\" to delete help frame") + ((eq help-setup 'reuse-other) ;; ... or displayed some other buffer before. "Type \"q\" to restore previous buffer")) help-window t)) @@ -1101,15 +1100,22 @@ ;; other one is the selected one. (help-window-display-message (cond - ((eq help-value 'new-window) + ((eq help-setup 'new-window) "Type \\[delete-other-windows] to delete the help window") - ((eq help-value 'reuse-other-window) - "Type \"q\" in other window to quit")) + ((eq help-setup 'reuse-other) + "Type \"q\" in help window to restore its previous buffer")) help-window 'other)) (t - ;; Not much to say here. + ;; The help window is not selected ... (help-window-display-message - "Type \"q\" in help window to quit" help-window)))))) + (cond + ((eq help-setup 'new-window) + ;; ... and is new, ... + "Type \"q\" in help window to delete it") + ((eq help-setup 'reuse-other) + ;; ... or displayed some other buffer before. + "Type \"q\" in help window to restore previous buffer")) + help-window)))))) ;; `with-help-window' is a wrapper for `with-output-to-temp-buffer' ;; providing the following additional twists: @@ -1134,18 +1140,18 @@ variable `temp-buffer-show-specifiers' to an appropriate value." (declare (indent 1) (debug t)) `(progn - ;; Reset `display-buffer-window': `display-buffer' is - ;; supposed to set this to the window displaying the buffer plus - ;; some additional information. - (setq display-buffer-window nil) ;; Make `help-window-point-marker' point nowhere. The only place ;; where this should be set to a buffer position is within BODY. (set-marker help-window-point-marker nil) - (prog1 - ;; Return value returned by `with-output-to-temp-buffer'. - (with-output-to-temp-buffer ,buffer-name - (progn ,@body)) - (when display-buffer-window (help-window-setup))))) + (let* (help-window + (temp-buffer-show-hook + (cons (lambda () (setq help-window (selected-window))) + temp-buffer-show-hook))) + ;; Return value returned by `with-output-to-temp-buffer'. + (prog1 + (with-output-to-temp-buffer ,buffer-name + (progn ,@body)) + (help-window-setup help-window))))) ;; Called from C, on encountering `help-char' when reading a char. ;; Don't print to *Help*; that would clobber Help history. === modified file 'lisp/window.el' --- lisp/window.el 2011-09-13 19:10:32 +0000 +++ lisp/window.el 2011-09-14 09:17:30 +0000 @@ -3785,17 +3785,6 @@ (window-state-put-2 ignore)) (window-check frame)))) -(defvar display-buffer-window nil - "Window used by `display-buffer' and related information. -After `display-buffer' displays a buffer in some window this -variable is a cons cell whose car denotes the window used to -display the buffer. The cdr is supposed to be one of the symbols -`reuse-buffer-window', `reuse-other-window', `new-window' or -`new-frame'. - -See the function `display-buffer-record-window' for how this -variable can be assigned a value.") - (defun display-buffer-record-window (type window buffer) "Record information for window used by `display-buffer'. TYPE must be one of the symbols reuse-window, pop-up-window, or @@ -3804,15 +3793,13 @@ displayed." (cond ((eq type 'reuse-window) - ;; In `display-buffer-window' record whether we used a window on the - ;; same buffer or another one. - (if (eq (window-buffer window) buffer) - (setq display-buffer-window - (cons window 'reuse-buffer-window)) - (setq display-buffer-window - (cons window 'reuse-other-window))) - ;; In quit-restore parameter record information about the old buffer - ;; unless such information exists already. + ;; In `help-setup' window parameter record whether we used a window + ;; on the same buffer or another one. + (set-window-parameter + window 'help-setup + (if (eq (window-buffer window) buffer) 'reuse-same 'reuse-other)) + ;; In `quit-restore' parameter record information about the old + ;; buffer unless such information exists already. (unless (window-parameter window 'quit-restore) (set-window-parameter window 'quit-restore @@ -3820,15 +3807,15 @@ (window-point window) buffer (window-total-size window) (selected-window))))) ((eq type 'pop-up-window) - ;; In `display-buffer-window' record window as new. - (setq display-buffer-window (cons window 'new-window)) + ;; In `help-setup' window parameter record window as new. + (set-window-parameter window 'help-setup 'new-window) ;; In `quit-restore' parameter record that we popped up this window, ;; its buffer, and which window was selected before. (set-window-parameter window 'quit-restore (list 'new-window buffer (selected-window)))) ((eq type 'pop-up-frame) - ;; In `display-buffer-window' record window as on new frame. - (setq display-buffer-window (cons window 'new-frame)) + ;; In `help-setup' window parameter record window as on new frame. + (set-window-parameter window 'help-setup 'new-frame) ;; In `quit-restore' parameter record that we popped up this window ;; on a new frame, the buffer, and which window was selected before. (set-window-parameter @@ -3841,9 +3828,8 @@ should choose or create a window, display the specified buffer in it, and return the window. -The function specified here is responsible for setting the value -of `display-buffer-window' and the quit-restore parameter of the -window used." +The function specified here is responsible for setting the +quit-restore and help-setup parameters of the window used." :type '(choice (const nil) (function :tag "function")) @@ -3913,8 +3899,8 @@ function, that function is called with the buffer named BUFFER-NAME as first, and the element's cdr as second argument. In any case, that function is responsible for setting the value -of `display-buffer-window' and the quit-restore parameter of the -window used. +The function specified here is responsible for setting the +quit-restore and help-setup parameters of the window used. If this variable appears \"not to work\", because you added a name to it but the corresponding buffer is displayed in the @@ -4115,9 +4101,8 @@ `special-display-buffer-names' or matches a regexp in `special-display-regexps'. -The function specified here is responsible for setting the value -of `display-buffer-window' and the quit-restore parameter of the -window used." +The function specified here is responsible for setting the +quit-restore and help-setup parameters of the window used." :type 'function :group 'frames) ------------------------------------------------------------ revno: 105763 author: Dani Moncayo committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-09-13 23:52:54 -0700 message: * doc/lispref/lists.texi (Sets And Lists): Fix typo. (tiny change) diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-09-11 02:04:07 +0000 +++ doc/lispref/ChangeLog 2011-09-14 06:52:54 +0000 @@ -1,3 +1,7 @@ +2011-09-14 Dani Moncayo (tiny change) + + * lists.texi (Sets And Lists): Fix typo. (Bug#9393) + 2011-09-11 Juanma Barranquero * processes.texi (Network Servers): Clarify what the process === modified file 'doc/lispref/lists.texi' --- doc/lispref/lists.texi 2011-08-30 22:43:43 +0000 +++ doc/lispref/lists.texi 2011-09-14 06:52:54 +0000 @@ -1454,7 +1454,7 @@ l @result{} ((2) (1)) ;; @r{If you want to change @code{l} reliably,} -;; @r{write @code{(setq l (delete elt l))}.} +;; @r{write @code{(setq l (delete '(2) l))}.} @end group @group (setq l '((2) (1) (2))) ------------------------------------------------------------ revno: 105762 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2011-09-14 01:20:23 -0400 message: xdisp.c (try_window_reusing_current_matrix): Fix incorrect computation of loop end. src/xdisp.c (try_window_reusing_current_matrix): Fix incorrect computation of loop end. Reported by Johan Bockg?rd . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-13 15:33:16 +0000 +++ src/ChangeLog 2011-09-14 05:20:23 +0000 @@ -1,3 +1,9 @@ +2011-09-14 Eli Zaretskii + + * xdisp.c (try_window_reusing_current_matrix): Fix incorrect + computation of loop end. Reported by Johan Bockgård + . + 2011-09-13 Chong Yidong * frame.c (Fother_visible_frames_p): Function deleted. === modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-11 17:40:53 +0000 +++ src/xdisp.c 2011-09-14 05:20:23 +0000 @@ -16077,7 +16077,7 @@ if (row < bottom_row) { struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos; - struct glyph *end = glyph + row->used[TEXT_AREA]; + struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA]; /* Can't use this optimization with bidi-reordered glyph rows, unless cursor is already at point. */ ------------------------------------------------------------ revno: 105761 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2011-09-14 01:42:21 +0200 message: Fix typos in ChangeLogs. diff: === modified file 'ChangeLog' --- ChangeLog 2011-09-11 16:52:58 +0000 +++ ChangeLog 2011-09-13 23:42:21 +0000 @@ -240,7 +240,7 @@ * m4/lstat.m4: Merge from gnulib (Bug#8878). -2011-06-16 Miles Bader +2011-06-16 Miles Bader * configure.in: Try to determine CRT_DIR automatically when using gcc. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-13 21:02:27 +0000 +++ lisp/ChangeLog 2011-09-13 23:42:21 +0000 @@ -18,8 +18,7 @@ (replace-buffer-in-windows): Delete buffer's window or frame if and only if window is dedicated. (quit-window): Handle quit-restore as before last change. - (bury-buffer): Delete window only if window-deletable-p returns - t. + (bury-buffer): Delete window only if window-deletable-p returns t. 2011-09-13 Chong Yidong @@ -848,14 +847,14 @@ Resolve invalid use of a regexp in regexp-opt. - * cc-fonts.el (c-complex-decl-matchers): Add in special detection - for a java annotation. - - * cc-engine.el (c-forward-decl-or-cast-1): Add in special - detection for a java annotation. - - * cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling - for java. + * progmodes/cc-fonts.el (c-complex-decl-matchers): Add in special + detection for a java annotation. + + * progmodes/cc-engine.el (c-forward-decl-or-cast-1): Add in special + detection for a java annotation. + + * progmodes/cc-langs.el (c-prefix-spec-kwds-re): Remove the special + handling for java. (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+". 2011-08-20 Chong Yidong @@ -1233,7 +1232,7 @@ * progmodes/cc-mode.el: Remove two autoload forms which loaded cc-langs. - * /progmodes/cc-langs.el (c-make-init-lang-vars-fun): Don't emit + * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Don't emit "(require 'cc-langs)". Quote a form so it will evaluate at (cc-mode's) compilation time. @@ -3897,7 +3896,7 @@ 2011-05-31 Helmut Eller - * debug.el (debug): Restore the previous content of the + * emacs-lisp/debug.el (debug): Restore the previous content of the *Backtrace* buffer when we exit with C-M-c. 2011-05-31 Stefan Monnier @@ -4546,7 +4545,8 @@ 2011-05-13 Didier Verna Common Lisp indentation improvements on defmethod and lambda-lists. - * cl-indent.el: Advertise the changes and remove obsolete TODO entries. + * emacs-lisp/cl-indent.el: Advertise the changes and remove obsolete + TODO entries. (lisp-lambda-list-keyword-parameter-indentation) (lisp-lambda-list-keyword-parameter-alignment) (lisp-lambda-list-keyword-alignment): New customizable user options. @@ -4596,7 +4596,7 @@ 2011-05-12 Eli Zaretskii - * smerge-mode.el (smerge-resolve): Use null-device rather than a + * vc/smerge-mode.el (smerge-resolve): Use null-device rather than a literal "/dev/null". 2011-05-12 Stefan Monnier @@ -6040,7 +6040,7 @@ 2011-04-08 Juanma Barranquero - * vc-annotate.el (vc-annotate-show-log-revision-at-line): + * vc/vc-annotate.el (vc-annotate-show-log-revision-at-line): Fix typo in docstring. 2011-04-08 Eli Zaretskii @@ -6712,7 +6712,7 @@ 2011-03-19 Eli Zaretskii - * emerge.el (emerge-metachars): Separate value for ms-dos and + * vc/emerge.el (emerge-metachars): Separate value for ms-dos and windows-nt systems. (emerge-protect-metachars): Quote correctly for ms-dos and windows-nt systems. ------------------------------------------------------------ revno: 105760 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-09-13 17:13:10 -0400 message: Tabify previous change. diff: === modified file 'lisp/emacs-lisp/debug.el' --- lisp/emacs-lisp/debug.el 2011-09-13 21:02:27 +0000 +++ lisp/emacs-lisp/debug.el 2011-09-13 21:13:10 +0000 @@ -345,68 +345,68 @@ (save-excursion (setq buffer (current-buffer)) (let ((inhibit-read-only t) - (old-end (point-min)) (new-end (point-min))) - ;; If we saved an old backtrace, find the common part - ;; between the new and the old. - ;; Compare line by line, starting from the end, - ;; because that's the part that is likely to be unchanged. - (if debugger-previous-backtrace - (let (old-start new-start (all-match t)) - (goto-char (point-max)) - (with-temp-buffer - (insert debugger-previous-backtrace) - (while (and all-match (not (bobp))) - (setq old-end (point)) - (forward-line -1) - (setq old-start (point)) - (with-current-buffer buffer - (setq new-end (point)) - (forward-line -1) - (setq new-start (point))) - (if (not (zerop - (let ((case-fold-search nil)) - (compare-buffer-substrings - (current-buffer) old-start old-end - buffer new-start new-end)))) - (setq all-match nil)))) - ;; Now new-end is the position of the start of the - ;; unchanged part in the current buffer, and old-end is - ;; the position of that same text in the saved old - ;; backtrace. But we must subtract (point-min) since strings are - ;; indexed in origin 0. - - ;; Replace the unchanged part of the backtrace - ;; with the text from debugger-previous-backtrace, - ;; since that already has the proper xrefs. - ;; With this optimization, we only need to scan - ;; the changed part of the backtrace. - (delete-region new-end (point-max)) - (goto-char (point-max)) - (insert (substring debugger-previous-backtrace - (- old-end (point-min)))) - ;; Make the unchanged part of the backtrace inaccessible - ;; so it won't be scanned. - (narrow-to-region (point-min) new-end))) - - ;; Scan the new part of the backtrace, inserting xrefs. - (goto-char (point-min)) - (while (progn - (goto-char (+ (point) 2)) - (skip-syntax-forward "^w_") - (not (eobp))) - (let* ((beg (point)) - (end (progn (skip-syntax-forward "w_") (point))) - (sym (intern-soft (buffer-substring-no-properties - beg end))) - (file (and sym (symbol-file sym 'defun)))) - (when file - (goto-char beg) - ;; help-xref-button needs to operate on something matched - ;; by a regexp, so set that up for it. - (re-search-forward "\\(\\sw\\|\\s_\\)+") - (help-xref-button 0 'help-function-def sym file))) - (forward-line 1)) - (widen)) + (old-end (point-min)) (new-end (point-min))) + ;; If we saved an old backtrace, find the common part + ;; between the new and the old. + ;; Compare line by line, starting from the end, + ;; because that's the part that is likely to be unchanged. + (if debugger-previous-backtrace + (let (old-start new-start (all-match t)) + (goto-char (point-max)) + (with-temp-buffer + (insert debugger-previous-backtrace) + (while (and all-match (not (bobp))) + (setq old-end (point)) + (forward-line -1) + (setq old-start (point)) + (with-current-buffer buffer + (setq new-end (point)) + (forward-line -1) + (setq new-start (point))) + (if (not (zerop + (let ((case-fold-search nil)) + (compare-buffer-substrings + (current-buffer) old-start old-end + buffer new-start new-end)))) + (setq all-match nil)))) + ;; Now new-end is the position of the start of the + ;; unchanged part in the current buffer, and old-end is + ;; the position of that same text in the saved old + ;; backtrace. But we must subtract (point-min) since strings are + ;; indexed in origin 0. + + ;; Replace the unchanged part of the backtrace + ;; with the text from debugger-previous-backtrace, + ;; since that already has the proper xrefs. + ;; With this optimization, we only need to scan + ;; the changed part of the backtrace. + (delete-region new-end (point-max)) + (goto-char (point-max)) + (insert (substring debugger-previous-backtrace + (- old-end (point-min)))) + ;; Make the unchanged part of the backtrace inaccessible + ;; so it won't be scanned. + (narrow-to-region (point-min) new-end))) + + ;; Scan the new part of the backtrace, inserting xrefs. + (goto-char (point-min)) + (while (progn + (goto-char (+ (point) 2)) + (skip-syntax-forward "^w_") + (not (eobp))) + (let* ((beg (point)) + (end (progn (skip-syntax-forward "w_") (point))) + (sym (intern-soft (buffer-substring-no-properties + beg end))) + (file (and sym (symbol-file sym 'defun)))) + (when file + (goto-char beg) + ;; help-xref-button needs to operate on something matched + ;; by a regexp, so set that up for it. + (re-search-forward "\\(\\sw\\|\\s_\\)+") + (help-xref-button 0 'help-function-def sym file))) + (forward-line 1)) + (widen)) (setq debugger-previous-backtrace (buffer-string))))) (defun debugger-step-through () ------------------------------------------------------------ revno: 105759 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-09-13 17:02:27 -0400 message: * lisp/emacs-lisp/debug.el (debugger-make-xrefs): Preserve point. (Bug#9462) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-13 19:10:32 +0000 +++ lisp/ChangeLog 2011-09-13 21:02:27 +0000 @@ -1,3 +1,8 @@ +2011-09-13 Glenn Morris + + * emacs-lisp/debug.el (debugger-make-xrefs): + Preserve point. (Bug#9462) + 2011-09-13 Chong Yidong * window.el (window-deletable-p): Use next-frame. === modified file 'lisp/emacs-lisp/debug.el' --- lisp/emacs-lisp/debug.el 2011-08-22 21:16:46 +0000 +++ lisp/emacs-lisp/debug.el 2011-09-13 21:02:27 +0000 @@ -342,71 +342,72 @@ "Attach cross-references to function names in the `*Backtrace*' buffer." (interactive "b") (with-current-buffer (or buffer (current-buffer)) - (setq buffer (current-buffer)) - (let ((inhibit-read-only t) - (old-end (point-min)) (new-end (point-min))) - ;; If we saved an old backtrace, find the common part - ;; between the new and the old. - ;; Compare line by line, starting from the end, - ;; because that's the part that is likely to be unchanged. - (if debugger-previous-backtrace - (let (old-start new-start (all-match t)) - (goto-char (point-max)) - (with-temp-buffer - (insert debugger-previous-backtrace) - (while (and all-match (not (bobp))) - (setq old-end (point)) - (forward-line -1) - (setq old-start (point)) - (with-current-buffer buffer - (setq new-end (point)) - (forward-line -1) - (setq new-start (point))) - (if (not (zerop - (let ((case-fold-search nil)) - (compare-buffer-substrings - (current-buffer) old-start old-end - buffer new-start new-end)))) - (setq all-match nil)))) - ;; Now new-end is the position of the start of the - ;; unchanged part in the current buffer, and old-end is - ;; the position of that same text in the saved old - ;; backtrace. But we must subtract (point-min) since strings are - ;; indexed in origin 0. - - ;; Replace the unchanged part of the backtrace - ;; with the text from debugger-previous-backtrace, - ;; since that already has the proper xrefs. - ;; With this optimization, we only need to scan - ;; the changed part of the backtrace. - (delete-region new-end (point-max)) - (goto-char (point-max)) - (insert (substring debugger-previous-backtrace - (- old-end (point-min)))) - ;; Make the unchanged part of the backtrace inaccessible - ;; so it won't be scanned. - (narrow-to-region (point-min) new-end))) - - ;; Scan the new part of the backtrace, inserting xrefs. - (goto-char (point-min)) - (while (progn - (goto-char (+ (point) 2)) - (skip-syntax-forward "^w_") - (not (eobp))) - (let* ((beg (point)) - (end (progn (skip-syntax-forward "w_") (point))) - (sym (intern-soft (buffer-substring-no-properties - beg end))) - (file (and sym (symbol-file sym 'defun)))) - (when file - (goto-char beg) - ;; help-xref-button needs to operate on something matched - ;; by a regexp, so set that up for it. - (re-search-forward "\\(\\sw\\|\\s_\\)+") - (help-xref-button 0 'help-function-def sym file))) - (forward-line 1)) - (widen)) - (setq debugger-previous-backtrace (buffer-string)))) + (save-excursion + (setq buffer (current-buffer)) + (let ((inhibit-read-only t) + (old-end (point-min)) (new-end (point-min))) + ;; If we saved an old backtrace, find the common part + ;; between the new and the old. + ;; Compare line by line, starting from the end, + ;; because that's the part that is likely to be unchanged. + (if debugger-previous-backtrace + (let (old-start new-start (all-match t)) + (goto-char (point-max)) + (with-temp-buffer + (insert debugger-previous-backtrace) + (while (and all-match (not (bobp))) + (setq old-end (point)) + (forward-line -1) + (setq old-start (point)) + (with-current-buffer buffer + (setq new-end (point)) + (forward-line -1) + (setq new-start (point))) + (if (not (zerop + (let ((case-fold-search nil)) + (compare-buffer-substrings + (current-buffer) old-start old-end + buffer new-start new-end)))) + (setq all-match nil)))) + ;; Now new-end is the position of the start of the + ;; unchanged part in the current buffer, and old-end is + ;; the position of that same text in the saved old + ;; backtrace. But we must subtract (point-min) since strings are + ;; indexed in origin 0. + + ;; Replace the unchanged part of the backtrace + ;; with the text from debugger-previous-backtrace, + ;; since that already has the proper xrefs. + ;; With this optimization, we only need to scan + ;; the changed part of the backtrace. + (delete-region new-end (point-max)) + (goto-char (point-max)) + (insert (substring debugger-previous-backtrace + (- old-end (point-min)))) + ;; Make the unchanged part of the backtrace inaccessible + ;; so it won't be scanned. + (narrow-to-region (point-min) new-end))) + + ;; Scan the new part of the backtrace, inserting xrefs. + (goto-char (point-min)) + (while (progn + (goto-char (+ (point) 2)) + (skip-syntax-forward "^w_") + (not (eobp))) + (let* ((beg (point)) + (end (progn (skip-syntax-forward "w_") (point))) + (sym (intern-soft (buffer-substring-no-properties + beg end))) + (file (and sym (symbol-file sym 'defun)))) + (when file + (goto-char beg) + ;; help-xref-button needs to operate on something matched + ;; by a regexp, so set that up for it. + (re-search-forward "\\(\\sw\\|\\s_\\)+") + (help-xref-button 0 'help-function-def sym file))) + (forward-line 1)) + (widen)) + (setq debugger-previous-backtrace (buffer-string))))) (defun debugger-step-through () "Proceed, stepping through subexpressions of this expression. ------------------------------------------------------------ revno: 105758 committer: Chong Yidong branch nick: trunk timestamp: Tue 2011-09-13 15:10:32 -0400 message: * lisp/window.el (window-deletable-p): Use next-frame. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-13 18:07:11 +0000 +++ lisp/ChangeLog 2011-09-13 19:10:32 +0000 @@ -1,3 +1,7 @@ +2011-09-13 Chong Yidong + + * window.el (window-deletable-p): Use next-frame. + 2011-09-13 Martin Rudalics * window.el (window-auto-delete): Remove. === modified file 'lisp/window.el' --- lisp/window.el 2011-09-13 18:07:11 +0000 +++ lisp/window.el 2011-09-13 19:10:32 +0000 @@ -2274,15 +2274,10 @@ (buffer (window-buffer window))) (cond ((frame-root-window-p window) - ;; WINDOW's frame can be deleted only if there are other visible - ;; frames on the same terminal. - (when (let ((terminal (frame-terminal frame))) - (catch 'found - (dolist (f (delq frame (frame-list))) - (and (eq terminal (frame-terminal f)) - (frame-visible-p f) - (throw 'found t))))) - 'frame)) + ;; WINDOW's frame can be deleted only if there are other frames + ;; on the same terminal. + (unless (eq frame (next-frame frame 0)) + 'frame)) ((or ignore-window-parameters (not (eq (window-parameter window 'window-side) 'none)) (and parent (eq (window-parameter parent 'window-side) 'none))) ------------------------------------------------------------ revno: 105757 committer: martin rudalics branch nick: trunk timestamp: Tue 2011-09-13 20:07:11 +0200 message: Remove most window auto deletions. * window.el (window-auto-delete): Remove. (window-deletable-p): Remove argument FORCE. Don't deal with dedicatedness and previous buffers. (switch-to-prev-buffer): Don't delete window. (delete-windows-on): Delete a window's frame if and only if the window is dedicated. (replace-buffer-in-windows): Delete buffer's window or frame if and only if window is dedicated. (quit-window): Handle quit-restore as before last change. (bury-buffer): Delete window only if window-deletable-p returns t. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-13 15:33:16 +0000 +++ lisp/ChangeLog 2011-09-13 18:07:11 +0000 @@ -1,3 +1,17 @@ +2011-09-13 Martin Rudalics + + * window.el (window-auto-delete): Remove. + (window-deletable-p): Remove argument FORCE. Don't deal with + dedicatedness and previous buffers. + (switch-to-prev-buffer): Don't delete window. + (delete-windows-on): Delete a window's frame if and only if the + window is dedicated. + (replace-buffer-in-windows): Delete buffer's window or frame if + and only if window is dedicated. + (quit-window): Handle quit-restore as before last change. + (bury-buffer): Delete window only if window-deletable-p returns + t. + 2011-09-13 Chong Yidong * window.el (window-deletable-p): Never delete the last frame on a === modified file 'lisp/window.el' --- lisp/window.el 2011-09-13 15:33:16 +0000 +++ lisp/window.el 2011-09-13 18:07:11 +0000 @@ -2258,40 +2258,10 @@ (next-window base-window (if nomini 'arg) all-frames)))) ;;; Deleting windows. -(defcustom window-auto-delete t - "If non-nil, quitting a window can delete the window. -If this variable is t, functions that quit a window can delete -the window and, if applicable, the corresponding frame. If it is -'frame, these functions can delete a window and its frame, -provided there are no other windows on the frame. If it is -'window, these functions can delete the window, provided there -are other windows on the corresponding frame. If this variable -is nil, functions that quit a window never delete the window or -the associated frame. - -Note that a frame can be effectively deleted if and only if -another frame still exists. - -Functions quitting a window and consequently affected by this -variable are `switch-to-prev-buffer' including its callers like -`bury-buffer', `replace-buffer-in-windows' and its callers like -`kill-buffer', and `quit-window'." - :type '(choice - (const :tag "Always" t) - (const :tag "Window" window) - (const :tag "Frame" frame) - (const :tag "Never" nil)) - :group 'windows) - -(defun window-deletable-p (&optional window force) +(defun window-deletable-p (&optional window) "Return t if WINDOW can be safely deleted from its frame. Return `frame' if deleting WINDOW should also delete its -frame. - -Optional argument FORCE non-nil means return non-nil unless -WINDOW is the root window of the only visible frame. FORCE nil -or omitted means return nil unless WINDOW is either dedicated to -its buffer or has no previous buffer to show instead." +frame." (setq window (window-normalize-any-window window)) (unless ignore-window-parameters @@ -2301,39 +2271,23 @@ (let* ((parent (window-parent window)) (frame (window-frame window)) - (buffer (window-buffer window)) - (dedicated (and (window-buffer window) (window-dedicated-p window))) - ;; prev non-nil means there is another buffer we can show - ;; in WINDOW instead. - (prev (and (window-live-p window) - (window-prev-buffers window) - (or (cdr (window-prev-buffers window)) - (not (eq (caar (window-prev-buffers window)) - buffer)))))) + (buffer (window-buffer window))) (cond ((frame-root-window-p window) - ;; We can delete the frame if (1) FORCE is non-nil, WINDOW is - ;; dedicated to its buffer, or there are no previous buffers to - ;; show and (2) there are other visible frames on this terminal. - (and (or force dedicated - (and (not prev) (memq window-auto-delete '(t frame)))) - ;; Are there visible frames on the same terminal? - (let ((terminal (frame-terminal frame))) - (catch 'found - (dolist (f (delq frame (frame-list))) - (and (eq terminal (frame-terminal f)) - (frame-visible-p f) - (throw 'found t))))) + ;; WINDOW's frame can be deleted only if there are other visible + ;; frames on the same terminal. + (when (let ((terminal (frame-terminal frame))) + (catch 'found + (dolist (f (delq frame (frame-list))) + (and (eq terminal (frame-terminal f)) + (frame-visible-p f) + (throw 'found t))))) 'frame)) - ((and (or force dedicated - (and (not prev) (memq window-auto-delete '(t window)))) - (or ignore-window-parameters - (not (eq (window-parameter window 'window-side) 'none)) - (and parent - (eq (window-parameter parent 'window-side) 'none)))) - ;; We can delete WINDOW if (1) either FORCE is non-nil, WINDOW is - ;; dedicated to its buffer, or there are no previous buffers to - ;; show and (2) WINDOW is not the main window of its frame. + ((or ignore-window-parameters + (not (eq (window-parameter window 'window-side) 'none)) + (and parent (eq (window-parameter parent 'window-side) 'none))) + ;; WINDOW can be deleted unless it is the main window of its + ;; frame. t)))) (defun window-or-subwindow-p (subwindow window) @@ -2601,84 +2555,75 @@ (old-buffer (window-buffer window)) ;; Save this since it's destroyed by `set-window-buffer'. (next-buffers (window-next-buffers window)) - entry new-buffer killed-buffers deletable visible) - (cond - ;; When BURY-OR-KILL is non-nil, there's no previous buffer for - ;; this window, and we can delete the window (or the frame) do - ;; that. - ((and bury-or-kill (setq deletable (window-deletable-p window))) - (if (eq deletable 'frame) - (delete-frame (window-frame window)) - (delete-window window))) - ((window-dedicated-p window) - (error "Window %s is dedicated to buffer %s" window old-buffer))) + entry new-buffer killed-buffers visible) + (when (window-dedicated-p window) + (error "Window %s is dedicated to buffer %s" window old-buffer)) - (unless deletable - (catch 'found - ;; Scan WINDOW's previous buffers first, skipping entries of next - ;; buffers. - (dolist (entry (window-prev-buffers window)) - (when (and (setq new-buffer (car entry)) - (or (buffer-live-p new-buffer) + (catch 'found + ;; Scan WINDOW's previous buffers first, skipping entries of next + ;; buffers. + (dolist (entry (window-prev-buffers window)) + (when (and (setq new-buffer (car entry)) + (or (buffer-live-p new-buffer) + (not (setq killed-buffers + (cons new-buffer killed-buffers)))) + (not (eq new-buffer old-buffer)) + (or bury-or-kill + (not (memq new-buffer next-buffers)))) + (set-window-buffer-start-and-point + window new-buffer (nth 1 entry) (nth 2 entry)) + (throw 'found t))) + ;; Scan reverted buffer list of WINDOW's frame next, skipping + ;; entries of next buffers. Note that when we bury or kill a + ;; buffer we don't reverse the global buffer list to avoid showing + ;; a buried buffer instead. Otherwise, we must reverse the global + ;; buffer list in order to make sure that switching to the + ;; previous/next buffer traverse it in opposite directions. + (dolist (buffer (if bury-or-kill + (buffer-list (window-frame window)) + (nreverse (buffer-list (window-frame window))))) + (when (and (buffer-live-p buffer) + (not (eq buffer old-buffer)) + (not (eq (aref (buffer-name buffer) 0) ?\s)) + (or bury-or-kill (not (memq buffer next-buffers)))) + (if (get-buffer-window buffer) + ;; Try to avoid showing a buffer visible in some other window. + (setq visible buffer) + (setq new-buffer buffer) + (set-window-buffer-start-and-point window new-buffer) + (throw 'found t)))) + (unless bury-or-kill + ;; Scan reverted next buffers last (must not use nreverse + ;; here!). + (dolist (buffer (reverse next-buffers)) + ;; Actually, buffer _must_ be live here since otherwise it + ;; would have been caught in the scan of previous buffers. + (when (and (or (buffer-live-p buffer) (not (setq killed-buffers - (cons new-buffer killed-buffers)))) - (not (eq new-buffer old-buffer)) - (or bury-or-kill - (not (memq new-buffer next-buffers)))) + (cons buffer killed-buffers)))) + (not (eq buffer old-buffer)) + (setq entry (assq buffer (window-prev-buffers window)))) + (setq new-buffer buffer) (set-window-buffer-start-and-point window new-buffer (nth 1 entry) (nth 2 entry)) - (throw 'found t))) - ;; Scan reverted buffer list of WINDOW's frame next, skipping - ;; entries of next buffers. Note that when we bury or kill a - ;; buffer we don't reverse the global buffer list to avoid showing - ;; a buried buffer instead. Otherwise, we must reverse the global - ;; buffer list in order to make sure that switching to the - ;; previous/next buffer traverse it in opposite directions. - (dolist (buffer (if bury-or-kill - (buffer-list (window-frame window)) - (nreverse (buffer-list (window-frame window))))) - (when (and (buffer-live-p buffer) - (not (eq buffer old-buffer)) - (not (eq (aref (buffer-name buffer) 0) ?\s)) - (or bury-or-kill (not (memq buffer next-buffers)))) - (if (get-buffer-window buffer) - ;; Try to avoid showing a buffer visible in some other window. - (setq visible buffer) - (setq new-buffer buffer) - (set-window-buffer-start-and-point window new-buffer) (throw 'found t)))) - (unless bury-or-kill - ;; Scan reverted next buffers last (must not use nreverse - ;; here!). - (dolist (buffer (reverse next-buffers)) - ;; Actually, buffer _must_ be live here since otherwise it - ;; would have been caught in the scan of previous buffers. - (when (and (or (buffer-live-p buffer) - (not (setq killed-buffers - (cons buffer killed-buffers)))) - (not (eq buffer old-buffer)) - (setq entry (assq buffer (window-prev-buffers window)))) - (setq new-buffer buffer) - (set-window-buffer-start-and-point - window new-buffer (nth 1 entry) (nth 2 entry)) - (throw 'found t)))) - - ;; Show a buffer visible in another window. - (when visible - (setq new-buffer visible) - (set-window-buffer-start-and-point window new-buffer))) - - (if bury-or-kill - ;; Remove `old-buffer' from WINDOW's previous and (restored list - ;; of) next buffers. - (progn - (set-window-prev-buffers - window (assq-delete-all old-buffer (window-prev-buffers window))) - (set-window-next-buffers window (delq old-buffer next-buffers))) - ;; Move `old-buffer' to head of WINDOW's restored list of next - ;; buffers. - (set-window-next-buffers - window (cons old-buffer (delq old-buffer next-buffers))))) + + ;; Show a buffer visible in another window. + (when visible + (setq new-buffer visible) + (set-window-buffer-start-and-point window new-buffer))) + + (if bury-or-kill + ;; Remove `old-buffer' from WINDOW's previous and (restored list + ;; of) next buffers. + (progn + (set-window-prev-buffers + window (assq-delete-all old-buffer (window-prev-buffers window))) + (set-window-next-buffers window (delq old-buffer next-buffers))) + ;; Move `old-buffer' to head of WINDOW's restored list of next + ;; buffers. + (set-window-next-buffers + window (cons old-buffer (delq old-buffer next-buffers)))) ;; Remove killed buffers from WINDOW's previous and next buffers. (when killed-buffers @@ -2823,8 +2768,9 @@ ;; Don't iconify if it's the only frame. (not (eq (next-frame nil 0) (selected-frame)))) (iconify-frame (window-frame (selected-window)))) - ((window-deletable-p) + ((eq (window-deletable-p) t) (delete-window))) + ;; Always return nil. nil)) @@ -2878,13 +2824,13 @@ (all-frames (cond ((not frame) t) ((eq frame t) nil) (t frame)))) (dolist (window (window-list-1 nil nil all-frames)) (if (eq (window-buffer window) buffer) - (let ((deletable (window-deletable-p window t))) + (let ((deletable (window-deletable-p window))) (cond - ((eq deletable 'frame) - ;; Delete frame. + ((and (eq deletable 'frame) (window-dedicated-p window)) + ;; Delete frame if and only if window is dedicated. (delete-frame (window-frame window))) - (deletable - ;; Delete window only. + ((eq deletable t) + ;; Delete window. (delete-window window)) (t ;; In window switch to previous buffer. @@ -2909,7 +2855,8 @@ (let ((buffer (window-normalize-buffer buffer-or-name))) (dolist (window (window-list-1 nil nil t)) (if (eq (window-buffer window) buffer) - (let ((deletable (window-deletable-p window))) + (let ((deletable (and (window-dedicated-p window) + (window-deletable-p window)))) (cond ((eq deletable 'frame) ;; Delete frame. @@ -2938,13 +2885,21 @@ (setq window (window-normalize-live-window window)) (let ((buffer (window-buffer window)) (quit-restore (window-parameter window 'quit-restore)) - deletable resize) + resize) (cond - ((setq deletable (window-deletable-p window)) - ;; Check if WINDOW's frame can be deleted. - (if (eq deletable 'frame) - (delete-frame (window-frame window)) - (delete-window window)) + ((and (eq (car-safe quit-restore) 'new-frame) + (eq (nth 1 quit-restore) (window-buffer window)) + (eq (window-deletable-p window) 'frame)) + ;; WINDOW's frame can be deleted. + (delete-frame (window-frame window)) + ;; If the previously selected window is still alive, select it. + (when (window-live-p (nth 2 quit-restore)) + (select-window (nth 2 quit-restore)))) + ((and (eq (car-safe quit-restore) 'new-window) + (eq (nth 1 quit-restore) (window-buffer window)) + (eq (window-deletable-p window) t)) + ;; WINDOW's can be deleted. + (delete-window window) ;; If the previously selected window is still alive, select it. (when (window-live-p (nth 2 quit-restore)) (select-window (nth 2 quit-restore)))) ------------------------------------------------------------ revno: 105756 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-09-13 13:57:04 -0400 message: * lisp/progmodes/scheme.el (scheme-indent-function): Yet another doc typo. diff: === modified file 'lisp/progmodes/scheme.el' --- lisp/progmodes/scheme.el 2011-09-13 17:44:25 +0000 +++ lisp/progmodes/scheme.el 2011-09-13 17:57:04 +0000 @@ -452,7 +452,7 @@ i) it checks for a non-nil value of the property `scheme-indent-function' \(or the deprecated `scheme-indent-hook'), rather than `lisp-indent-function'. -ii) if that property specifes a function, it is called with three +ii) if that property specifies a function, it is called with three arguments (not two), the third argument being the default (i.e., current) indentation." (let ((normal-indent (current-column))) ------------------------------------------------------------ revno: 105755 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-09-13 13:44:25 -0400 message: * lisp/progmodes/scheme.el (scheme-indent-function): Fix doc typo in previous. diff: === modified file 'lisp/progmodes/scheme.el' --- lisp/progmodes/scheme.el 2011-09-13 06:55:10 +0000 +++ lisp/progmodes/scheme.el 2011-09-13 17:44:25 +0000 @@ -450,7 +450,7 @@ This behaves like the function `lisp-indent-function', except that: i) it checks for a non-nil value of the property `scheme-indent-function' -\(or the deprecated `scheme-indent-hook'), rather than `lisp-indent-function.' +\(or the deprecated `scheme-indent-hook'), rather than `lisp-indent-function'. ii) if that property specifes a function, it is called with three arguments (not two), the third argument being the default (i.e., current) ------------------------------------------------------------ revno: 105754 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-09-13 19:18:08 +0200 message: Fix URL connection failing handling. * url-http.el (url-http-find-free-connection): If there was an error on connect, make sure the user isn't bothered with irrelevant questions. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2011-08-07 17:48:11 +0000 +++ lisp/url/ChangeLog 2011-09-13 17:18:08 +0000 @@ -1,3 +1,9 @@ +2011-09-13 Lars Magne Ingebrigtsen + + * url-http.el (url-http-find-free-connection): If there was an + error on connect, make sure the user isn't bothered with + irrelevant questions. + 2011-08-07 Chong Yidong * url-http.el (url-http-parse-headers): For HTTP 301/302/307, === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2011-08-07 17:48:11 +0000 +++ lisp/url/url-http.el 2011-09-13 17:18:08 +0000 @@ -180,6 +180,10 @@ ;; Drop the temp buffer link before killing the buffer. (set-process-buffer proc nil)) proc) + ;; If there was an error on connect, make sure we don't + ;; get queried. + (when (get-buffer-process buf) + (set-process-query-on-exit-flag (get-buffer-process buf) nil)) (kill-buffer buf))))))) ;; Building an HTTP request ------------------------------------------------------------ revno: 105753 committer: Chong Yidong branch nick: trunk timestamp: Tue 2011-09-13 11:33:16 -0400 message: * lisp/window.el (window-deletable-p): Never delete last frame on a terminal. * src/frame.c (Fother_visible_frames_p): Function deleted. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-13 07:22:05 +0000 +++ lisp/ChangeLog 2011-09-13 15:33:16 +0000 @@ -1,3 +1,8 @@ +2011-09-13 Chong Yidong + + * window.el (window-deletable-p): Never delete the last frame on a + given terminal. + 2011-09-13 Glenn Morris * help.el (describe-key-briefly): Copy previous standard-output change. === modified file 'lisp/window.el' --- lisp/window.el 2011-09-11 20:07:34 +0000 +++ lisp/window.el 2011-09-13 15:33:16 +0000 @@ -2312,13 +2312,19 @@ buffer)))))) (cond ((frame-root-window-p window) - (when (and (or force dedicated - (and (not prev) (memq window-auto-delete '(t frame)))) - (other-visible-frames-p frame)) - ;; We can delete WINDOW's frame if (1) either FORCE is non-nil, - ;; WINDOW is dedicated to its buffer, or there are no previous - ;; buffers to show and (2) there are other visible frames left. - 'frame)) + ;; We can delete the frame if (1) FORCE is non-nil, WINDOW is + ;; dedicated to its buffer, or there are no previous buffers to + ;; show and (2) there are other visible frames on this terminal. + (and (or force dedicated + (and (not prev) (memq window-auto-delete '(t frame)))) + ;; Are there visible frames on the same terminal? + (let ((terminal (frame-terminal frame))) + (catch 'found + (dolist (f (delq frame (frame-list))) + (and (eq terminal (frame-terminal f)) + (frame-visible-p f) + (throw 'found t))))) + 'frame)) ((and (or force dedicated (and (not prev) (memq window-auto-delete '(t window)))) (or ignore-window-parameters === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-12 11:51:27 +0000 +++ src/ChangeLog 2011-09-13 15:33:16 +0000 @@ -1,3 +1,7 @@ +2011-09-13 Chong Yidong + + * frame.c (Fother_visible_frames_p): Function deleted. + 2011-09-12 Eli Zaretskii * indent.c (compute_motion): Process display vector front to back === modified file 'src/frame.c' --- src/frame.c 2011-09-09 08:32:43 +0000 +++ src/frame.c 2011-09-13 15:33:16 +0000 @@ -1155,17 +1155,6 @@ return 1; } -DEFUN ("other-visible-frames-p", Fother_visible_frames_p, Sother_visible_frames_p, 0, 1, 0, - doc: /* Return t if there are other visible frames beside FRAME. -FRAME defaults to the selected frame. */) - (Lisp_Object frame) -{ - if (NILP (frame)) - frame = selected_frame; - CHECK_LIVE_FRAME (frame); - return other_visible_frames (XFRAME (frame)) ? Qt : Qnil; -} - /* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME unconditionally. x_connection_closed and delete_terminal use this. Any other value of FORCE implements the semantics @@ -4475,7 +4464,6 @@ defsubr (&Sframe_list); defsubr (&Snext_frame); defsubr (&Sprevious_frame); - defsubr (&Sother_visible_frames_p); defsubr (&Sdelete_frame); defsubr (&Smouse_position); defsubr (&Smouse_pixel_position); ------------------------------------------------------------ revno: 105752 committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-09-13 00:22:05 -0700 message: * lisp/help.el (describe-key-briefly): Copy previous standard-output change. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-13 07:18:13 +0000 +++ lisp/ChangeLog 2011-09-13 07:22:05 +0000 @@ -1,3 +1,7 @@ +2011-09-13 Glenn Morris + + * help.el (describe-key-briefly): Copy previous standard-output change. + 2011-09-13 PJ Weisberg (tiny change) * help.el (where-is): Respect non-standard standard-output. (Bug#9030) === modified file 'lisp/help.el' --- lisp/help.el 2011-09-13 07:18:13 +0000 +++ lisp/help.el 2011-09-13 07:22:05 +0000 @@ -625,7 +625,7 @@ (aref key 1) (aref key 0))) (modifiers (event-modifiers event)) - (standard-output (if insert (current-buffer) t)) + (standard-output (if insert (current-buffer) standard-output)) (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers) (memq 'drag modifiers)) " at that spot" "")) (defn (key-binding key t)) ------------------------------------------------------------ revno: 105751 fixes bug(s): http://debbugs.gnu.org/9030 author: PJ Weisberg committer: Glenn Morris branch nick: trunk timestamp: Tue 2011-09-13 00:18:13 -0700 message: * lisp/help.el (where-is): Respect non-standard standard-output. (tiny change) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-13 06:55:10 +0000 +++ lisp/ChangeLog 2011-09-13 07:18:13 +0000 @@ -1,3 +1,7 @@ +2011-09-13 PJ Weisberg (tiny change) + + * help.el (where-is): Respect non-standard standard-output. (Bug#9030) + 2011-09-13 Glenn Morris * emacs-lisp/lisp-mode.el (lisp-indent-function): === modified file 'lisp/help.el' --- lisp/help.el 2011-09-03 17:16:57 +0000 +++ lisp/help.el 2011-09-13 07:18:13 +0000 @@ -527,7 +527,7 @@ (unless definition (error "No command")) (let ((func (indirect-function definition)) (defs nil) - (standard-output (if insert (current-buffer) t))) + (standard-output (if insert (current-buffer) standard-output))) ;; In DEFS, find all symbols that are aliases for DEFINITION. (mapatoms (lambda (symbol) (and (fboundp symbol) ------------------------------------------------------------ revno: 105750 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-09-12 23:55:10 -0700 message: Doc fixes related to lisp-indent-function (bug#9484) * lisp/emacs-lisp/lisp-mode.el (lisp-indent-function): Doc fix. * lisp/progmodes/scheme.el (scheme-indent-function): Give it a doc string. * lisp/emacs-lisp/cl-indent.el (common-lisp-indent-function): Comment. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-12 20:45:56 +0000 +++ lisp/ChangeLog 2011-09-13 06:55:10 +0000 @@ -1,3 +1,8 @@ +2011-09-13 Glenn Morris + + * emacs-lisp/lisp-mode.el (lisp-indent-function): + * progmodes/scheme.el (scheme-indent-function): Doc fixes. + 2011-09-12 Chong Yidong * dired-aux.el (dired-mark-read-string): Don't return default === modified file 'lisp/emacs-lisp/cl-indent.el' --- lisp/emacs-lisp/cl-indent.el 2011-05-13 19:27:52 +0000 +++ lisp/emacs-lisp/cl-indent.el 2011-09-13 06:55:10 +0000 @@ -167,6 +167,7 @@ (+ loop-indentation lisp-loop-forms-indentation))))) +;; Cf (info "(elisp)Specification List") ;;;###autoload (defun common-lisp-indent-function (indent-point state) "Function to indent the arguments of a Lisp function call. === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2011-07-06 16:46:27 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2011-09-13 06:55:10 +0000 @@ -1102,25 +1102,31 @@ (defun lisp-indent-function (indent-point state) "This function is the normal value of the variable `lisp-indent-function'. -It is used when indenting a line within a function call, to see if the -called function says anything special about how to indent the line. +The function `calculate-lisp-indent' calls this to determine +if the arguments of a Lisp function call should be indented specially. INDENT-POINT is the position where the user typed TAB, or equivalent. Point is located at the point to indent under (for default indentation); STATE is the `parse-partial-sexp' state for that position. -If the current line is in a call to a Lisp function -which has a non-nil property `lisp-indent-function', -that specifies how to do the indentation. The property value can be -* `defun', meaning indent `defun'-style; +If the current line is in a call to a Lisp function that has a non-nil +property `lisp-indent-function' (or the deprecated `lisp-indent-hook'), +it specifies how to indent. The property value can be: + +* `defun', meaning indent `defun'-style + \(this is also the case if there is no property and the function + has a name that begins with \"def\", and three or more arguments); + * an integer N, meaning indent the first N arguments specially - like ordinary function arguments and then indent any further + (like ordinary function arguments), and then indent any further arguments like a body; -* a function to call just as this function was called. - If that function returns nil, that means it doesn't specify - the indentation. - -This function also returns nil meaning don't specify the indentation." + +* a function to call that returns the indentation (or nil). + `lisp-indent-function' calls this function with the same two arguments + that it itself received. + +This function returns either the indentation to use, or nil if the +Lisp function does not specify a special indentation." (let ((normal-indent (current-column))) (goto-char (1+ (elt state 1))) (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) === modified file 'lisp/progmodes/scheme.el' --- lisp/progmodes/scheme.el 2011-08-22 03:38:30 +0000 +++ lisp/progmodes/scheme.el 2011-09-13 06:55:10 +0000 @@ -442,9 +442,19 @@ (defvar calculate-lisp-indent-last-sexp) -;; Copied from lisp-indent-function, but with gets of -;; scheme-indent-{function,hook}. + +;; FIXME this duplicates almost all of lisp-indent-function. +;; Extract common code to a subroutine. (defun scheme-indent-function (indent-point state) + "Scheme mode function for the value of the variable `lisp-indent-function'. +This behaves like the function `lisp-indent-function', except that: + +i) it checks for a non-nil value of the property `scheme-indent-function' +\(or the deprecated `scheme-indent-hook'), rather than `lisp-indent-function.' + +ii) if that property specifes a function, it is called with three +arguments (not two), the third argument being the default (i.e., current) +indentation." (let ((normal-indent (current-column))) (goto-char (1+ (elt state 1))) (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) ------------------------------------------------------------ revno: 105749 author: William Stevenson committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-09-12 21:55:46 -0400 message: * themes/adwaita-theme.el: New file. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-09-13 00:34:13 +0000 +++ etc/ChangeLog 2011-09-13 01:55:46 +0000 @@ -1,7 +1,11 @@ +2011-09-13 William Stevenson + + * themes/adwaita-theme.el: New file. + 2011-09-13 Scott Frazer * themes/whiteboard-theme.el: - * themes/deeper-blue-theme.el (deeper-blue): New files. + * themes/deeper-blue-theme.el: New files. 2011-09-05 Juri Linkov === added file 'etc/themes/adwaita-theme.el' --- etc/themes/adwaita-theme.el 1970-01-01 00:00:00 +0000 +++ etc/themes/adwaita-theme.el 2011-09-13 01:55:46 +0000 @@ -0,0 +1,106 @@ +;;; adwaita-theme.el --- Tango-based custom theme for faces + +;; Copyright (C) 2010-2011 Free Software Foundation, Inc. + +;; Author: William Stevenson + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(deftheme adwaita + "Face colors similar to the default theme of Gnome 3 (Adwaita). +The colors are chosen to match Adwaita window decorations and the +default look of the Gnome 3 desktop.") + +(let ((class '((class color) (min-colors 89)))) + (custom-theme-set-faces + 'adwaita + `(cursor ((,class (:background "#00BBFF")))) + `(border-color ((,class (:background "#EDEDED")))) + `(default ((,class (:background "#EDEDED" :foreground "#2E3436")))) + `(fringe ((,class (:background "#E6E6E6")))) + `(mode-line ((,class (:box (:line-width -1 :style released-button) + :background "white" :foreground "#2E3436")))) + `(mode-line-inactive ((,class (:foreground "#C6C6C6" :background ,"white")))) + `(header-line ((,class (:foreground "#CCCCCC" :background "black")))) + + `(minibuffer-prompt ((,class (:foreground "#0084C8" :bold t)))) + `(region ((,class (:foreground unspecified :background "#C2D5E9")))) + `(dired-header ((,class (:bold t :foreground "#0084C8")))) + `(widget-button ((,class (:bold t :foreground "#0084C8")))) + + `(success ((,class (:bold t :foreground "#4E9A06")))) + `(warning ((,class (:foreground "#CE5C00")))) + `(error ((,class (:foreground "#B50000")))) + + `(font-lock-builtin-face ((,class (:foreground "#A020F0")))) + `(font-lock-constant-face ((,class (:foreground "#F5666D")))) + `(font-lock-comment-face ((,class (:foreground "#204A87")))) + `(font-lock-function-name-face ((,class (:foreground "#00578E" :bold t)))) + `(font-lock-keyword-face ((,class (:bold t :foreground "#A52A2A")))) + `(font-lock-string-face ((,class (:foreground "#4E9A06")))) + `(font-lock-type-face ((,class (:foreground "#2F8B58" :bold t)))) + `(font-lock-variable-name-face ((,class (:foreground "#0084C8" :bold t)))) + `(font-lock-warning-face ((,class (:foreground "#F5666D" :bold t)))) + + `(link ((,class (:underline t :foreground "#0066CC")))) + `(link-visited ((,class (:underline t :foreground "#6799CC")))) + `(highlight ((,class (:foreground "white" :background "#4A90D9")))) + `(isearch ((,class (:foreground "white" :background "#77A4DD")))) + + `(erc-action-face ((,class (:foreground "#F5666D")))) + `(erc-button ((,class (:foreground "#A8799C")))) + `(erc-current-nick-face ((,class (:bold t :foreground "#FF7092")))) + `(erc-error-face ((,class (:foreground "#F5666D" :bold t)))) + `(erc-input-face ((,class (:foreground "black")))) + `(erc-keyword-face ((,class (:foreground "#F5666D")))) + `(erc-my-nick-face ((,class (:bold t :foreground "#FF8CA7")))) + `(erc-nick-default-face ((,class (:bold t :foreground "#0084C8")))) + `(erc-notice-face ((,class (:foreground "#0084C8")))) + `(erc-prompt-face ((,class (:foreground "black")))) + `(erc-timestamp-face ((,class (:foreground ,"#4CB64A")))) + + `(magit-log-sha1 ((,class (:foreground "#FF7092")))) + `(magit-log-head-label-local ((,class (:foreground "#4F78B5")))) + `(magit-log-head-label-remote ((,class (:foreground ,"#4CB64A")))) + `(magit-branch ((,class (:bold t :foreground "#0084C8")))) + `(magit-section-title ((,class (:bold t :foreground "#00578E")))) + `(magit-item-highlight ((,class (:background "#FEFFBF")))) + `(magit-diff-add ((,class (:bold t :foreground "#4CB64A")))) + `(magit-diff-del ((,class (:bold nil :foreground "#F5666D")))) + + `(gnus-group-mail-1-empty ((,class (:foreground "#00578E")))) + `(gnus-group-mail-1 ((,class (:bold t :foreground "#4F78B5")))) + `(gnus-group-mail-3-empty ((,class (:foreground "#00578E")))) + `(gnus-group-mail-3 ((,class (:bold t :foreground "#9CBB43")))) + `(gnus-group-news-3-empty ((,class (:foreground "#00578E")))) + `(gnus-group-news-3 ((,class (:bold t :foreground "#9CBB43")))) + `(gnus-header-name ((,class (:bold t :foreground "#0084C8")))) + `(gnus-header-subject ((,class (:bold t :foreground "#FF7092")))) + `(gnus-header-content ((,class (:foreground "#FF7092")))) + `(gnus-button ((,class (:bold t :foreground "#00578E")))) + `(gnus-cite-1 ((,class (:foreground "#00578E")))) + `(gnus-cite-2 ((,class (:foreground "#0084C8")))) + + `(diff-added ((,class (:bold t :foreground "#4E9A06")))) + `(diff-removed ((,class (:bold t :foreground "#F5666D")))))) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; adwaita-theme.el ends here === modified file 'etc/themes/deeper-blue-theme.el' --- etc/themes/deeper-blue-theme.el 2011-09-13 00:34:13 +0000 +++ etc/themes/deeper-blue-theme.el 2011-09-13 01:55:46 +0000 @@ -35,7 +35,6 @@ `(compilation-error ((,class (:foreground "Red1")))) `(compilation-info ((,class (:weight normal :foreground "LightSkyBlue")))) `(compilation-line-number ((,class (:foreground "LightGreen")))) - `(compilation-warning ((,class (:foreground "Yellow")))) `(cperl-array-face ((,class (:foreground "yellow2")))) `(cperl-hash-face ((,class (:foreground "coral1")))) `(cursor ((,class (:background "green" :foreground "black")))) @@ -60,6 +59,7 @@ `(ediff-fine-diff-A ((,class (:background "skyblue4" :foreground "white")))) `(ediff-fine-diff-B ((,class (:background "cyan4" :foreground "white")))) `(ediff-odd-diff-A ((,class (:background "Grey50" :foreground "White")))) + `(error ((,class (:foreground "red")))) `(flymake-errline ((,class (:background nil :underline "red")))) `(flymake-warnline ((,class (:background nil :underline "magenta3")))) `(font-lock-builtin-face ((,class (:foreground "LightCoral")))) @@ -77,7 +77,6 @@ `(font-lock-string-face ((,class (:foreground "burlywood")))) `(font-lock-type-face ((,class (:foreground "CadetBlue1")))) `(font-lock-variable-name-face ((,class (:foreground "SeaGreen2")))) - `(font-lock-warning-face ((,class (:foreground "red")))) `(fringe ((,class (:background "black")))) `(highlight ((,class (:background "DodgerBlue4")))) `(ido-first-match ((,class (:weight normal :foreground "orange")))) @@ -104,7 +103,9 @@ `(primary-selection ((,class (:background "blue3")))) `(region ((,class (:background "#103050")))) `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white")))) - `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white")))))) + `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white")))) + `(success ((,class (:foreground "SeaGreen2")))) + `(warning ((,class (:foreground "Yellow")))))) (provide-theme 'deeper-blue) === modified file 'etc/themes/whiteboard-theme.el' --- etc/themes/whiteboard-theme.el 2011-09-13 00:34:13 +0000 +++ etc/themes/whiteboard-theme.el 2011-09-13 01:55:46 +0000 @@ -35,7 +35,6 @@ `(compilation-error ((,class (:foreground "Red1")))) `(compilation-info ((,class (:weight normal :foreground "DeepSkyBlue4")))) `(compilation-line-number ((,class (:foreground "DarkGreen")))) - `(compilation-warning ((,class (:foreground "Yellow4")))) `(cperl-array-face ((,class (:foreground "SlateBlue3")))) `(cperl-hash-face ((,class (:foreground "turquoise3")))) `(cperl-nonoverridable-face ((,class (:foreground "orchid3")))) @@ -86,7 +85,8 @@ `(primary-selection ((,class (:background "blue3")))) `(region ((,class (:background "SkyBlue1")))) `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white")))) - `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white")))))) + `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white")))) + `(warning ((,class (:foreground "Yellow4")))))) (provide-theme 'whiteboard) ------------------------------------------------------------ revno: 105748 author: Scott Frazer committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-09-12 20:34:13 -0400 message: Two new themes from Scott Frazer. * themes/whiteboard-theme.el: * themes/deeper-blue-theme.el (deeper-blue): New files. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-09-05 08:20:02 +0000 +++ etc/ChangeLog 2011-09-13 00:34:13 +0000 @@ -1,3 +1,8 @@ +2011-09-13 Scott Frazer + + * themes/whiteboard-theme.el: + * themes/deeper-blue-theme.el (deeper-blue): New files. + 2011-09-05 Juri Linkov * grep.txt: Add `eval' to the Local Variables section that === added file 'etc/themes/deeper-blue-theme.el' --- etc/themes/deeper-blue-theme.el 1970-01-01 00:00:00 +0000 +++ etc/themes/deeper-blue-theme.el 2011-09-13 00:34:13 +0000 @@ -0,0 +1,115 @@ +;;; deeper-blue-theme.el --- Custom theme for faces + +;; Copyright (C) 2011 Free Software Foundation, Inc. + +;; Author: Scott Frazer + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(deftheme deeper-blue + "Face colors using a deep blue backgound.") + +(let ((class '((class color) (min-colors 89)))) + (custom-theme-set-faces + 'deeper-blue + `(Info-title-1-face ((,class (:family "helv" :weight bold :height 1.728)))) + `(Info-title-2-face ((,class (:family "helv" :weight bold :height 1.44)))) + `(Info-title-3-face ((,class (:family "helv" :weight bold :height 1.2)))) + `(Info-title-4-face ((,class (:family "helv" :weight bold)))) + `(compilation-column-number ((,class (:foreground "LightGreen")))) + `(compilation-error ((,class (:foreground "Red1")))) + `(compilation-info ((,class (:weight normal :foreground "LightSkyBlue")))) + `(compilation-line-number ((,class (:foreground "LightGreen")))) + `(compilation-warning ((,class (:foreground "Yellow")))) + `(cperl-array-face ((,class (:foreground "yellow2")))) + `(cperl-hash-face ((,class (:foreground "coral1")))) + `(cursor ((,class (:background "green" :foreground "black")))) + `(default ((,class (:background "#181a26" :foreground "gray80")))) + `(diff-added ((,class (nil)))) + `(diff-changed ((,class (nil)))) + `(diff-context ((,class (:foreground "seashell4")))) + `(diff-file-header ((,class (:background "grey60")))) + `(diff-function ((,class (:inherit diff-header)))) + `(diff-header ((,class (:background "grey45")))) + `(diff-hunk-header ((,class (:inherit diff-header)))) + `(diff-index ((,class (:inherit diff-file-header)))) + `(diff-indicator-added ((,class (:foreground "white" :background "darkolivegreen")))) + `(diff-indicator-changed ((,class (:foreground "white" :background "dodgerblue4")))) + `(diff-indicator-removed ((,class (:foreground "white" :background "indianred4")))) + `(diff-refine-change ((,class (:background "skyblue4")))) + `(diff-removed ((,class (nil)))) + `(dired-marked ((,class (:background "dodgerblue3" :foreground "white")))) + `(ediff-current-diff-A ((,class (:background "green4" :foreground "white")))) + `(ediff-current-diff-B ((,class (:background "darkorange3" :foreground "white")))) + `(ediff-even-diff-B ((,class (:background "Grey50" :foreground "White")))) + `(ediff-fine-diff-A ((,class (:background "skyblue4" :foreground "white")))) + `(ediff-fine-diff-B ((,class (:background "cyan4" :foreground "white")))) + `(ediff-odd-diff-A ((,class (:background "Grey50" :foreground "White")))) + `(flymake-errline ((,class (:background nil :underline "red")))) + `(flymake-warnline ((,class (:background nil :underline "magenta3")))) + `(font-lock-builtin-face ((,class (:foreground "LightCoral")))) + `(font-lock-comment-delimiter-face ((,class (:foreground "gray50")))) + `(font-lock-comment-face ((,class (:foreground "gray50")))) + `(font-lock-constant-face ((,class (:foreground "DarkOliveGreen3")))) + `(font-lock-doc-face ((,class (:foreground "moccasin")))) + `(font-lock-doc-string-face ((,class (:foreground "moccasin")))) + `(font-lock-function-name-face ((,class (:foreground "goldenrod")))) + `(font-lock-keyword-face ((,class (:foreground "DeepSkyBlue1")))) + `(font-lock-preprocessor-face ((,class (:foreground "gold")))) + `(font-lock-reference-face ((,class (:foreground "LightCoral")))) + `(font-lock-regexp-grouping-backslash ((,class (:weight bold)))) + `(font-lock-regexp-grouping-construct ((,class (:weight bold)))) + `(font-lock-string-face ((,class (:foreground "burlywood")))) + `(font-lock-type-face ((,class (:foreground "CadetBlue1")))) + `(font-lock-variable-name-face ((,class (:foreground "SeaGreen2")))) + `(font-lock-warning-face ((,class (:foreground "red")))) + `(fringe ((,class (:background "black")))) + `(highlight ((,class (:background "DodgerBlue4")))) + `(ido-first-match ((,class (:weight normal :foreground "orange")))) + `(ido-only-match ((,class (:foreground "green")))) + `(ido-subdir ((,class (:foreground nil :inherit font-lock-keyword-face)))) + `(info-header-node ((,class (:foreground "DeepSkyBlue1")))) + `(info-header-xref ((,class (:foreground "SeaGreen2")))) + `(info-menu-header ((,class (:family "helv" :weight bold)))) + `(info-node ((,class (:foreground "DeepSkyBlue1")))) + `(info-xref ((,class (:foreground "SeaGreen2")))) + `(isearch ((,class (:background "coral2" :foreground "white")))) + `(isearch-lazy-highlight-face ((,class (:background "coral4" :foreground "white")))) + `(lazy-highlight ((,class (:background "cadetblue" :foreground "white")))) + `(match ((,class (:background "DeepPink4")))) + `(minibuffer-prompt ((,class (:foreground "CadetBlue1")))) + `(mode-line ((,class (:background "gray75" :foreground "black" :box (:line-width 1 :style released-button))))) + `(mode-line-buffer-id ((,class (:weight bold :background nil :foreground "blue4")))) + `(mode-line-inactive ((,class (:background "gray40" :foreground "black" :box (:line-width 1 :color "gray40" :style nil))))) + `(outline-1 ((,class (:foreground "SkyBlue1")))) + `(outline-2 ((,class (:foreground "CadetBlue1")))) + `(outline-3 ((,class (:foreground "LightSteelBlue1")))) + `(outline-4 ((,class (:foreground "turquoise2")))) + `(outline-5 ((,class (:foreground "aquamarine1")))) + `(primary-selection ((,class (:background "blue3")))) + `(region ((,class (:background "#103050")))) + `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white")))) + `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white")))))) + +(provide-theme 'deeper-blue) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; deeper-blue-theme.el ends here === added file 'etc/themes/whiteboard-theme.el' --- etc/themes/whiteboard-theme.el 1970-01-01 00:00:00 +0000 +++ etc/themes/whiteboard-theme.el 2011-09-13 00:34:13 +0000 @@ -0,0 +1,97 @@ +;;; whiteboard-theme.el --- Custom theme for faces + +;; Copyright (C) 2011 Free Software Foundation, Inc. + +;; Author: Scott Frazer + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(deftheme whiteboard + "Face colors similar to markers on a whiteboard.") + +(let ((class '((class color) (min-colors 89)))) + (custom-theme-set-faces + 'whiteboard + `(Info-title-1-face ((,class (:family "helv" :weight bold :height 1.728)))) + `(Info-title-2-face ((,class (:family "helv" :weight bold :height 1.44)))) + `(Info-title-3-face ((,class (:family "helv" :weight bold :height 1.2)))) + `(Info-title-4-face ((,class (:family "helv" :weight bold)))) + `(compilation-column-number ((,class (:foreground "DarkGreen")))) + `(compilation-error ((,class (:foreground "Red1")))) + `(compilation-info ((,class (:weight normal :foreground "DeepSkyBlue4")))) + `(compilation-line-number ((,class (:foreground "DarkGreen")))) + `(compilation-warning ((,class (:foreground "Yellow4")))) + `(cperl-array-face ((,class (:foreground "SlateBlue3")))) + `(cperl-hash-face ((,class (:foreground "turquoise3")))) + `(cperl-nonoverridable-face ((,class (:foreground "orchid3")))) + `(cursor ((,class (:background "Green4" :foreground "gainsboro")))) + `(default ((,class (:background "whitesmoke" :foreground "black")))) + `(dired-marked ((,class (:background "dodgerblue3" :foreground "white")))) + `(flymake-errline ((,class (:background nil :underline "red")))) + `(flymake-warnline ((,class (:background nil :underline "magenta3")))) + `(font-lock-builtin-face ((,class (:foreground "DarkOrange3")))) + `(font-lock-comment-delimiter-face ((,class (:foreground "gray50")))) + `(font-lock-comment-face ((,class (:foreground "gray50")))) + `(font-lock-constant-face ((,class (:foreground "DarkOliveGreen4")))) + `(font-lock-doc-face ((,class (:foreground "peru")))) + `(font-lock-doc-string-face ((,class (:foreground "peru")))) + `(font-lock-function-name-face ((,class (:foreground "goldenrod3")))) + `(font-lock-keyword-face ((,class (:foreground "DodgerBlue2")))) + `(font-lock-preprocessor-face ((,class (:foreground "gold3")))) + `(font-lock-reference-face ((,class (:foreground "salmon")))) + `(font-lock-regexp-grouping-backslash ((,class (:weight bold)))) + `(font-lock-regexp-grouping-construct ((,class (:weight bold)))) + `(font-lock-string-face ((,class (:foreground "burlywood4")))) + `(font-lock-type-face ((,class (:foreground "DeepSkyBlue4")))) + `(font-lock-variable-name-face ((,class (:foreground "SeaGreen4")))) + `(font-lock-warning-face ((,class (:foreground "red")))) + `(fringe ((,class (:background "gainsboro")))) + `(highlight ((,class (:background "SkyBlue1")))) + `(ido-first-match ((,class (:weight normal :foreground "DarkOrange3")))) + `(ido-only-match ((,class (:foreground "SeaGreen4")))) + `(ido-subdir ((,class (:foreground nil :inherit font-lock-keyword-face)))) + `(info-header-node ((,class (:foreground "DeepSkyBlue1")))) + `(info-header-xref ((,class (:foreground "SeaGreen2")))) + `(info-menu-header ((,class (:family "helv" :weight bold)))) + `(info-node ((,class (:foreground "DeepSkyBlue1")))) + `(info-xref ((,class (:foreground "SeaGreen4")))) + `(isearch ((,class (:background "coral2" :foreground "white")))) + `(isearch-lazy-highlight-face ((,class (:background "coral4" :foreground "white")))) + `(lazy-highlight ((,class (:background "cadetblue" :foreground "white")))) + `(match ((,class (:background "LightPink1")))) + `(minibuffer-prompt ((,class (:foreground "DodgerBlue4")))) + `(mode-line ((,class (:background "gray75" :foreground "black" :box (:line-width 1 :style released-button))))) + `(mode-line-buffer-id ((,class (:weight bold :background nil :foreground "blue4")))) + `(mode-line-inactive ((,class (:background "gray40" :foreground "black" :box (:line-width 1 :color "gray40" :style nil))))) + `(outline-1 ((,class (:foreground "Blue3")))) + `(outline-2 ((,class (:foreground "DodgerBlue")))) + `(outline-3 ((,class (:foreground "SteelBlue")))) + `(outline-4 ((,class (:foreground "RoyalBlue")))) + `(outline-5 ((,class (:foreground "DeepSkyBlue")))) + `(primary-selection ((,class (:background "blue3")))) + `(region ((,class (:background "SkyBlue1")))) + `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white")))) + `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white")))))) + +(provide-theme 'whiteboard) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; whiteboard-theme.el ends here ------------------------------------------------------------ revno: 105747 fixes bug(s): http://debbugs.gnu.org/9361 committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-09-12 16:45:56 -0400 message: * dired-aux.el (dired-mark-read-string): Don't use default value on empty input. (dired-do-chxxx): Treat empty input for "touch" as no -t option. Omit initial minibuffer contents. (dired-do-chmod): Signal an error on empty input. (dired-mark-read-string): Don't return default on empty input. * files.el (file-modes-symbolic-to-number): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-12 02:18:23 +0000 +++ lisp/ChangeLog 2011-09-12 20:45:56 +0000 @@ -1,3 +1,14 @@ +2011-09-12 Chong Yidong + + * dired-aux.el (dired-mark-read-string): Don't return default + value on empty input (Bug#9361). + (dired-do-chxxx): Treat empty input for "touch" as no -t option. + Omit initial minibuffer contents. + (dired-do-chmod): Signal an error on empty input. + (dired-mark-read-string): Don't return default on empty input. + + * files.el (file-modes-symbolic-to-number): Doc fix. + 2011-09-12 Stefan Monnier * international/mule-cmds.el (ucs-completions): Remove. === modified file 'lisp/dired-aux.el' --- lisp/dired-aux.el 2011-08-04 00:58:07 +0000 +++ lisp/dired-aux.el 2011-09-12 20:45:56 +0000 @@ -236,18 +236,16 @@ ;; OP-SYMBOL is the type of operation (for use in `dired-mark-pop-up'). ;; ARG describes which files to use, as in `dired-get-marked-files'. (let* ((files (dired-get-marked-files t arg)) - (initial - (if (eq op-symbol 'touch) - (format-time-string "%Y%m%d%H%M.%S"))) - (default - (if (eq op-symbol 'touch) - (and (stringp (car files)) - (format-time-string "%Y%m%d%H%M.%S" - (nth 5 (file-attributes (car files))))))) - (new-attribute - (dired-mark-read-string - (concat "Change " attribute-name " of %s to: ") - initial op-symbol arg files default)) + (default (and (eq op-symbol 'touch) + (stringp (car files)) + (format-time-string "%Y%m%d%H%M.%S" + (nth 5 (file-attributes (car files)))))) + (prompt (concat "Change " attribute-name " of %s to" + (if (eq op-symbol 'touch) + " (default now): " + ": "))) + (new-attribute (dired-mark-read-string prompt nil op-symbol + arg files default)) (operation (concat program " " new-attribute)) failures) (setq failures @@ -255,9 +253,10 @@ (function dired-check-process) (append (list operation program) - (if (eq op-symbol 'touch) - '("-t") nil) - (list new-attribute) + (unless (string-equal new-attribute "") + (if (eq op-symbol 'touch) + (list "-t" new-attribute) + (list new-attribute))) (if (string-match "gnu" system-configuration) '("--") nil)) files)) @@ -285,10 +284,19 @@ (match-string 2 modestr) (match-string 3 modestr))))) (modes (dired-mark-read-string - "Change mode of %s to: " nil + "Change mode of %s to: " + ;; Insert initial input if there's only one file. + (unless (cadr files) default) 'chmod arg files default)) - (num-modes (if (string-match "^[0-7]+" modes) - (string-to-number modes 8)))) + num-modes) + + (cond ((equal modes "") + ;; We used to treat empty input as DEFAULT, but that is not + ;; such a good idea (Bug#9361). + (error "No file mode specified")) + ((string-match "^[0-7]+" modes) + (setq num-modes (string-to-number modes 8)))) + (dolist (file files) (set-file-modes file @@ -379,22 +387,24 @@ 'print arg file-list))) (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) -;; Read arguments for a marked-files command that wants a string -;; that is not a file name, -;; perhaps popping up the list of marked files. -;; ARG is the prefix arg and indicates whether the files came from -;; marks (ARG=nil) or a repeat factor (integerp ARG). -;; If the current file was used, the list has but one element and ARG -;; does not matter. (It is non-nil, non-integer in that case, namely '(4)). - -(defun dired-mark-read-string (prompt initial op-symbol arg files &optional default) - ;; PROMPT for a string, with INITIAL input and DEFAULT value. - ;; Other args are used to give user feedback and pop-up: - ;; OP-SYMBOL of command, prefix ARG, marked FILES. - (dired-mark-pop-up - nil op-symbol files - (function read-string) - (format prompt (dired-mark-prompt arg files)) initial nil default)) +(defun dired-mark-read-string (prompt initial op-symbol arg files + &optional standard-value) + "Read args for a Dired marked-files command, prompting with PROMPT. +Return the user input (a string). + +INITIAL, if non-nil, is the initial minibuffer input. +OP-SYMBOL is an operation symbol (see `dired-no-confirm'). +ARG is normally the prefix argument for the calling command. +FILES should be a list of file names. + +STANDARD-VALUE, if non-nil, should be a \"standard\" value or +list of such values, available via history commands. Note that +if the user enters empty input, this function returns the empty +string, not STANDARD-VALUE." + (dired-mark-pop-up nil op-symbol files + 'read-from-minibuffer + (format prompt (dired-mark-prompt arg files)) + initial nil nil nil standard-value)) ;;; Cleaning a directory: flagging some backups for deletion. === modified file 'lisp/dired.el' --- lisp/dired.el 2011-09-11 17:08:17 +0000 +++ lisp/dired.el 2011-09-12 20:45:56 +0000 @@ -3663,7 +3663,7 @@ ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "bbb53a5b6bf56c413fe0f898559bef8d") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "bbc9babe193843cad535d73492326c48") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ === modified file 'lisp/files.el' --- lisp/files.el 2011-09-03 01:41:27 +0000 +++ lisp/files.el 2011-09-12 20:45:56 +0000 @@ -6301,7 +6301,7 @@ "Convert symbolic file modes to numeric file modes. MODES is the string to convert, it should match \"[ugoa]*([+-=][rwxXstugo]*)+,...\". -See (info \"(coreutils)File permissions\") for more information on this +See Info node `(coreutils)File permissions' for more information on this notation. FROM (or 0 if nil) gives the mode bits on which to base permissions if MODES request to add, remove, or set permissions based on existing ones, ------------------------------------------------------------ revno: 105746 author: Eric Hanchrow committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-09-12 10:48:34 -0400 message: * doc/emacs/frames.texi (Frame Commands): Doc fix for delete-other-frames. Note that it only deletes frames on current terminal. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-09-10 08:26:12 +0000 +++ doc/emacs/ChangeLog 2011-09-12 14:48:34 +0000 @@ -1,3 +1,8 @@ +2011-09-12 Eric Hanchrow + + * frames.texi (Frame Commands): Note that delete-other-frames only + deletes frames on current terminal. + 2011-09-10 Eli Zaretskii * sending.texi (Mail Misc): Document mail-add-attachment. === modified file 'doc/emacs/frames.texi' --- doc/emacs/frames.texi 2011-08-27 12:10:24 +0000 +++ doc/emacs/frames.texi 2011-09-12 14:48:34 +0000 @@ -448,17 +448,23 @@ @item C-x 5 1 @kindex C-x 5 1 @findex delete-other-frames -Delete all frames except the selected one. +Delete all frames on the current terminal, except the selected one. @end table - The @kbd{C-x 5 0} (@code{delete-frame}) command will never delete -the last frame, to prevent you from losing the ability to interact + The @kbd{C-x 5 0} (@code{delete-frame}) command never deletes the +last frame. This prevents you from losing the ability to interact with the Emacs process. Note that when Emacs is run as a daemon (@pxref{Emacs Server}), there is always a ``virtual frame'' that remains after all the ordinary, interactive frames are deleted. In this case, @kbd{C-x 5 0} can delete the last interactive frame; you can use @command{emacsclient} to reconnect to the Emacs session. + The @kbd{C-x 5 1} (@code{delete-other-frames}) command only deletes +frames on the current terminal. For example, if you call it from an X +frame, it deletes the other frames on that X display; if the Emacs +process has frames open on other X displays or text terminals, those +are not deleted. + @vindex focus-follows-mouse On X, you may have to tell Emacs how the window manager handles focus-switching between windows, in order for @kbd{C-x 5 o} ------------------------------------------------------------ revno: 105745 fixes bug(s): http://debbugs.gnu.org/2496 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2011-09-12 07:51:27 -0400 message: Fix bug #2496 with column counting in presence of display tables. src/indent.c (compute_motion): Process display vector front to back rather than the other way around. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-12 02:22:22 +0000 +++ src/ChangeLog 2011-09-12 11:51:27 +0000 @@ -1,3 +1,8 @@ +2011-09-12 Eli Zaretskii + + * indent.c (compute_motion): Process display vector front to back + rather than the other way around. (Bug#2496) + 2011-09-12 Stefan Monnier * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0. === modified file 'src/indent.c' --- src/indent.c 2011-09-04 17:24:12 +0000 +++ src/indent.c 2011-09-12 11:51:27 +0000 @@ -1543,7 +1543,7 @@ n = 1; } - for (i = n - 1; i >= 0; --i) + for (i = 0; i < n; ++i) { if (VECTORP (charvec)) { ------------------------------------------------------------ revno: 105744 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-09-12 06:18:39 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2011-09-07 10:18:28 +0000 +++ autogen/configure 2011-09-12 10:18:39 +0000 @@ -16935,13 +16935,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'getopt.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'getopt.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/getopt.h#{ - s#.*"\(.*/getopt.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_getopt_h='<'getopt.h'>' fi @@ -17261,6 +17272,34 @@ } } } +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Avoid a crash on native Windows. */ +#define WIN32_LEAN_AND_MEAN +#include +#include +static LONG WINAPI +exception_filter (EXCEPTION_POINTERS *ExceptionInfo) +{ + switch (ExceptionInfo->ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + case EXCEPTION_IN_PAGE_ERROR: + case EXCEPTION_STACK_OVERFLOW: + case EXCEPTION_GUARD_PAGE: + case EXCEPTION_PRIV_INSTRUCTION: + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_NONCONTINUABLE_EXCEPTION: + exit (1); + } + return EXCEPTION_CONTINUE_SEARCH; +} +static void +nocrash_init (void) +{ + SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); +} #else /* Avoid a crash on POSIX systems. */ #include @@ -17653,13 +17692,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdint.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'stdint.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdint.h#{ - s#.*"\(.*/stdint.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi @@ -18349,13 +18399,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'inttypes.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'inttypes.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/inttypes.h#{ - s#.*"\(.*/inttypes.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_inttypes_h='<'inttypes.h'>' fi @@ -19045,13 +19106,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'time.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'time.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/time.h#{ - s#.*"\(.*/time.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -19074,6 +19146,8 @@ + + ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : ac_have_decl=1 @@ -20579,13 +20653,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'signal.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'signal.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/signal.h#{ - s#.*"\(.*/signal.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -20623,6 +20708,8 @@ + + ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " #include @@ -20810,13 +20897,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdarg.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'stdarg.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdarg.h#{ - s#.*"\(.*/stdarg.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -20999,13 +21097,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stddef.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'stddef.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stddef.h#{ - s#.*"\(.*/stddef.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -21058,13 +21167,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdio.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'stdio.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdio.h#{ - s#.*"\(.*/stdio.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -21139,13 +21259,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdlib.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'stdlib.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdlib.h#{ - s#.*"\(.*/stdlib.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -21385,13 +21516,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'sys/stat.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'sys/stat.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/sys/stat.h#{ - s#.*"\(.*/sys/stat.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi @@ -21552,13 +21694,24 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac + + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'unistd.h#{ + s#.*"\(.*'"${gl_dirsep_regex}"'unistd.h\)".*#\1# + s#^/[^/]#//&# + p + q + }' gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/unistd.h#{ - s#.*"\(.*/unistd.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_unistd_h='<'unistd.h'>' fi @@ -21591,6 +21744,8 @@ + + gl_gnulib_enabled_dosname=false gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false gl_gnulib_enabled_sigprocmask=false ------------------------------------------------------------ revno: 105743 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2011-09-12 09:12:46 +0000 message: gnus.el (gnus-interactive-exit): Update defcustom spec. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-12 02:15:11 +0000 +++ lisp/gnus/ChangeLog 2011-09-12 09:12:46 +0000 @@ -1,3 +1,7 @@ +2011-09-12 Lars Magne Ingebrigtsen + + * gnus.el (gnus-interactive-exit): Update defcustom spec. + 2011-09-12 Stefan Monnier * gnus.el (gnus-nntp-server): Move to gnus-int.el to silence bytecomp. === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2011-09-12 02:15:11 +0000 +++ lisp/gnus/gnus.el 2011-09-12 09:12:46 +0000 @@ -1588,7 +1588,8 @@ If `quiet', update any active summary buffers automatically first before exiting." :group 'gnus-exit - :type 'boolean) + :type '(choice boolean + (const quiet))) (defcustom gnus-extract-address-components 'gnus-extract-address-components "*Function for extracting address components from a From header. ------------------------------------------------------------ revno: 105742 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2011-09-11 22:22:22 -0400 message: * src/fileio.c (Finsert_file_contents): Don't assume beg_offset is 0. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-11 22:04:52 +0000 +++ src/ChangeLog 2011-09-12 02:22:22 +0000 @@ -1,3 +1,7 @@ +2011-09-12 Stefan Monnier + + * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0. + 2011-09-11 Chong Yidong * minibuf.c (Fread_from_minibuffer): Doc fix. === modified file 'src/fileio.c' --- src/fileio.c 2011-09-11 14:49:24 +0000 +++ src/fileio.c 2011-09-12 02:22:22 +0000 @@ -3546,7 +3546,7 @@ immediate_quit = 0; /* If the file matches the buffer completely, there's no need to replace anything. */ - if (same_at_start - BEGV_BYTE == end_offset) + if (same_at_start - BEGV_BYTE == end_offset - beg_offset) { emacs_close (fd); specpdl_ptr--; ------------------------------------------------------------ revno: 105741 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2011-09-11 22:18:23 -0400 message: * lisp/international/mule-cmds.el (ucs-completions): Remove. (read-char-by-name): Use complete-with-action instead; add metadata. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 21:47:39 +0000 +++ lisp/ChangeLog 2011-09-12 02:18:23 +0000 @@ -1,3 +1,8 @@ +2011-09-12 Stefan Monnier + + * international/mule-cmds.el (ucs-completions): Remove. + (read-char-by-name): Use complete-with-action instead; add metadata. + 2011-09-11 Chong Yidong * window.el (display-buffer--action-function-custom-type) @@ -19,8 +24,8 @@ Use switch-to-buffer. * cus-edit.el (customize-group, custom-buffer-create) - (customize-browse, custom-buffer-create-other-window): Use - switch-to-buffer or switch-to-buffer-other-window. + (customize-browse, custom-buffer-create-other-window): + Use switch-to-buffer or switch-to-buffer-other-window. * info.el (info, Info-find-node, Info-revert-find-node, Info-next) (Info-prev, Info-up, Info-speedbar-goto-node) @@ -86,8 +91,8 @@ (mail-other-window): Use switch-to-buffer-other-window. (mail-other-frame): USe switch-to-buffer-other-frame. - * progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use - display-buffer-other-frame. + * progmodes/gdb-mi.el (gdb-frame-gdb-buffer): + Use display-buffer-other-frame. (gdb-display-gdb-buffer): Use pop-to-buffer. * progmodes/gud.el (gud-goto-info): Use info-other-window. @@ -119,7 +124,7 @@ (display-buffer-use-some-window): Don't perform any special pop-up-frames handling. (pop-to-buffer): Use window-normalize-buffer-to-switch-to. - (display-buffer--maybe-same-window): Renamed from + (display-buffer--maybe-same-window): Rename from display-buffer-maybe-same-window. * info.el: Don't set same-window-regexps. @@ -317,7 +322,7 @@ 2011-09-03 Chong Yidong - * mail/sendmail.el (sendmail-query-once-function): Deleted. + * mail/sendmail.el (sendmail-query-once-function): Delete. (sendmail-query-once): Save directly to send-mail-function. Update message-send-mail-function too. @@ -329,7 +334,7 @@ start python interpreter from menu-bar (as reported by Geert Kloosterman). (inferior-python-mode-map): Fix typo. - (python-shell-map): Removed. + (python-shell-map): Remove. 2011-09-03 Deniz Dogan @@ -346,8 +351,8 @@ * window.el (window-deletable-p): Don't return a non-nil value when there's a buffer that was shown in the window before. (Bug#9419) - (display-buffer-pop-up-frame, display-buffer-pop-up-window): Set - window's previous buffers to nil. + (display-buffer-pop-up-frame, display-buffer-pop-up-window): + Set window's previous buffers to nil. 2011-09-03 Eli Zaretskii @@ -361,7 +366,7 @@ 2011-09-02 Chong Yidong - * window.el (pop-to-buffer-1, pop-to-buffer-same-window): Deleted. + * window.el (pop-to-buffer-1, pop-to-buffer-same-window): Delete. (pop-to-buffer): Change interactive spec. Pass second argument directly to display-buffer. (display-buffer): Fix interactive spec. Use functionp to @@ -388,7 +393,7 @@ (display-buffer-reuse-or-pop-window) (display-buffer-use-some-window): New functions. (display-buffer-default-action): Use them. - (display-buffer-default): Deleted. + (display-buffer-default): Delete. (pop-to-buffer-1): Fix choice of actions. 2011-09-02 Stefan Monnier === modified file 'lisp/international/mule-cmds.el' --- lisp/international/mule-cmds.el 2011-07-15 14:24:09 +0000 +++ lisp/international/mule-cmds.el 2011-09-12 02:18:23 +0000 @@ -2914,10 +2914,6 @@ (setq c (1+ c)))) (setq ucs-names names)))) -(defvar ucs-completions (lazy-completion-table ucs-completions ucs-names) - "Lazy completion table for completing on Unicode character names.") -(put 'ucs-completions 'risky-local-variable t) - (defun read-char-by-name (prompt) "Read a character by its Unicode name or hex number string. Display PROMPT and read a string that represents a character by its @@ -2935,7 +2931,12 @@ point or a number in hash notation, e.g. #o21430 for octal, #x2318 for hex, or #10r8984 for decimal." (let* ((completion-ignore-case t) - (input (completing-read prompt ucs-completions))) + (input (completing-read + prompt + (lambda (string pred action) + (if (eq action 'metadata) + '(metadata (category . unicode-name)) + (complete-with-action action (ucs-names) string pred)))))) (cond ((string-match-p "^[0-9a-fA-F]+$" input) (string-to-number input 16)) ------------------------------------------------------------ revno: 105740 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2011-09-11 22:15:11 -0400 message: * gnus.el (gnus-nntp-server): Move to gnus-int.el to silence bytecomp. * gnus-int.el (gnus-nntp-server): Move from gnus.el. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-12 01:00:11 +0000 +++ lisp/gnus/ChangeLog 2011-09-12 02:15:11 +0000 @@ -1,3 +1,8 @@ +2011-09-12 Stefan Monnier + + * gnus.el (gnus-nntp-server): Move to gnus-int.el to silence bytecomp. + * gnus-int.el (gnus-nntp-server): Move from gnus.el. + 2011-09-12 Andrew Cohen * gnus-group.el (gnus-group-list-limit-map, gnus-group-list-flush-map) @@ -8,14 +13,13 @@ * message.el (message-pop-to-buffer): Default to switch-to-buffer. (message-mail-other-window, message-mail-other-frame) - (message-news-other-window, message-news-other-frame): Use - switch-to-buffer-other-frame and switch-to-buffer-other-window instead - of setting buffer display varibles. + (message-news-other-window, message-news-other-frame): + Use switch-to-buffer-other-frame and switch-to-buffer-other-window + instead of setting buffer display varibles. 2011-09-11 Lars Magne Ingebrigtsen - * gnus-group.el (gnus-group-list-limit): Explain what the command - does. + * gnus-group.el (gnus-group-list-limit): Explain what the command does. * gnus-sum.el (gnus-fetch-headers): Bump message level. @@ -66,7 +70,7 @@ * plstore.el (plstore--get-buffer): Silence compiler warnings by renaming function arguments from `this'. - * gnus-sum.el (gnus-newsgroup-recent): Removed. + * gnus-sum.el (gnus-newsgroup-recent): Remove. * gnus-spec.el (gnus-lrm-string-p): `bidi-string-mark-left-to-right' has been renamed. @@ -196,8 +200,8 @@ * nnmairix.el (nnmairix-request-set-mark) (nnmairix-goto-original-article): Remove adding of article to registry, since `gnus-registry-add-group' isn't available anymore. - (nnmairix-determine-original-group-from-registry): Use - `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't + (nnmairix-determine-original-group-from-registry): + Use `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't available anymore. 2011-08-12 Simon Josefsson @@ -308,7 +312,7 @@ 2011-08-02 Lars Magne Ingebrigtsen - * starttls.el (starttls-available-p): Renamed from + * starttls.el (starttls-available-p): Rename from `starttls-any-program-available' and changed return convention. 2011-07-31 Lars Ingebrigtsen @@ -364,8 +368,8 @@ * nnir.el (gnus-group-make-nnir-group): Allow optional search query argument. - (gnus-group-make-nnir-group, nnir-request-group, nnir-run-query): Use - `nnir-address' to handle server info rather than passing an arg. + (gnus-group-make-nnir-group, nnir-request-group, nnir-run-query): + Use `nnir-address' to handle server info rather than passing an arg. * nnimap.el (nnimap-make-thread-query): New utility function to format an imap thread search query. @@ -418,7 +422,7 @@ 2011-07-15 Lars Magne Ingebrigtsen - * gnus.el (debbugs-gnu): Renamed from debbugs-emacs. + * gnus.el (debbugs-gnu): Rename from debbugs-emacs. * message.el (message-reply): Work around mysterious bug where `message-mode' seems to overwrite the locally bound `subject' variable. @@ -447,9 +451,9 @@ * gnus-msg.el (gnus-bug): Don't insert user variables. It usually isn't very interesting any more, and it leaks potentially secret data. - (gnus-debug): Removed. + (gnus-debug): Remove. - * gnus-art.el (gnus-ignored-headers): Removed obsolete and non-working + * gnus-art.el (gnus-ignored-headers): Remove obsolete and non-working use of :custom-show. 2011-07-07 Daiki Ueno @@ -636,8 +640,8 @@ * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Take an optional quit window configuration. - * auth-source.el (epg-context-set-passphrase-callback): Remove - duplicate autoload. + * auth-source.el (epg-context-set-passphrase-callback): + Remove duplicate autoload. 2011-06-30 Andrew Cohen @@ -754,7 +758,7 @@ * spam.el (spam-stat): Require in a normal fashion without binding `spam-stat-install-hooks' to avoid compilation warnings. - * spam-stat.el (spam-stat-install-hooks): Removed. + * spam-stat.el (spam-stat-install-hooks): Remove. (spam-stat-install-hooks): Don't run automatically. 2011-06-26 Timo Juhani Lindfors (tiny change) === modified file 'lisp/gnus/gnus-int.el' --- lisp/gnus/gnus-int.el 2011-09-10 23:30:53 +0000 +++ lisp/gnus/gnus-int.el 2011-09-12 02:15:11 +0000 @@ -63,6 +63,13 @@ (const :tag "Deny server" denied) (const :tag "Unplug Agent" offline))) +(defcustom gnus-nntp-server nil + "The name of the host running the NNTP server." + :group 'gnus-server + :type '(choice (const :tag "disable" nil) + string)) +(make-obsolete-variable 'gnus-nntp-server 'gnus-select-method "24.1") + (defvar gnus-internal-registry-spool-current-method nil "The current method, for the registry.") === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2011-09-10 23:30:53 +0000 +++ lisp/gnus/gnus.el 2011-09-12 02:15:11 +0000 @@ -1395,13 +1395,6 @@ :type '(repeat string)) (make-obsolete-variable 'gnus-secondary-servers 'gnus-select-method "24.1") -(defcustom gnus-nntp-server nil - "The name of the host running the NNTP server." - :group 'gnus-server - :type '(choice (const :tag "disable" nil) - string)) -(make-obsolete-variable 'gnus-nntp-server 'gnus-select-method "24.1") - (defcustom gnus-secondary-select-methods nil "A list of secondary methods that will be used for reading news. This is a list where each element is a complete select method (see ------------------------------------------------------------ revno: 105739 author: Andrew Cohen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2011-09-12 01:00:11 +0000 message: gnus-group.el (gnus-group-list-(limit|flush|plus)-map): Allow limiting, flushing and plusing ticked articles. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-11 22:50:22 +0000 +++ lisp/gnus/ChangeLog 2011-09-12 01:00:11 +0000 @@ -1,3 +1,9 @@ +2011-09-12 Andrew Cohen + + * gnus-group.el (gnus-group-list-limit-map, gnus-group-list-flush-map) + (gnus-group-list-plus-map): Allow limiting, flushing and plusing ticked + articles. + 2011-09-11 Chong Yidong * message.el (message-pop-to-buffer): Default to switch-to-buffer. === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2011-09-11 22:50:22 +0000 +++ lisp/gnus/gnus-group.el 2011-09-12 01:00:11 +0000 @@ -710,7 +710,8 @@ "M" gnus-group-list-limit "l" gnus-group-list-limit "c" gnus-group-list-limit - "?" gnus-group-list-limit) + "?" gnus-group-list-limit + "!" gnus-group-list-limit) (gnus-define-keys (gnus-group-list-flush-map "f" gnus-group-list-map) "k" gnus-group-list-flush @@ -722,7 +723,8 @@ "M" gnus-group-list-flush "l" gnus-group-list-flush "c" gnus-group-list-flush - "?" gnus-group-list-flush) + "?" gnus-group-list-flush + "!" gnus-group-list-flush) (gnus-define-keys (gnus-group-list-plus-map "p" gnus-group-list-map) "k" gnus-group-list-plus @@ -734,7 +736,8 @@ "M" gnus-group-list-plus "l" gnus-group-list-plus "c" gnus-group-list-plus - "?" gnus-group-list-plus) + "?" gnus-group-list-plus + "!" gnus-group-list-plus) (gnus-define-keys (gnus-group-score-map "W" gnus-group-mode-map) "f" gnus-score-flush-cache ------------------------------------------------------------ revno: 105738 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2011-09-11 22:50:22 +0000 message: Merge changes made in Gnus trunk. gnus.texi (Listing Groups): Explain `gnus-group-list-limit'. (Finding the News): Doc clarification. (Terminology): Mention naming. gnus-group.el (gnus-group-list-limit): Explain what the command does. gnus-sum.el (gnus-fetch-headers): Bump message level. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-09-10 23:30:53 +0000 +++ doc/misc/ChangeLog 2011-09-11 22:50:22 +0000 @@ -1,3 +1,9 @@ +2011-09-11 Lars Magne Ingebrigtsen + + * gnus.texi (Listing Groups): Explain `gnus-group-list-limit'. + (Finding the News): Doc clarification. + (Terminology): Mention naming. + 2011-09-10 Lars Magne Ingebrigtsen * gnus.texi: Remove mentions of `recent', which are now obsolete. === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-09-10 23:30:53 +0000 +++ doc/misc/gnus.texi 2011-09-11 22:50:22 +0000 @@ -1011,7 +1011,7 @@ news. This variable should be a list where the first element says @dfn{how} and the second element says @dfn{where}. This method is your native method. All groups not fetched with this method are -foreign groups. +secondary or foreign groups. For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where you want to get your daily dosage of news from, you'd say: @@ -3335,8 +3335,12 @@ @item A / @kindex A / (Group) @findex gnus-group-list-limit -List groups limited within the current selection -(@code{gnus-group-list-limit}). +Further limit groups within the current selection +(@code{gnus-group-list-limit}). If you've first limited to groups +with dormant articles with @kbd{A ?}, you can then further limit with +@kbd{A / c}, which will then limit to groups with cached articles, +giving you the groups that have both dormant articles and cached +articles. @item A f @kindex A f (Group) @@ -28572,18 +28576,21 @@ @item native @cindex native Gnus will always use one method (and back end) as the @dfn{native}, or -default, way of getting news. +default, way of getting news. Groups from the native select method +have names like @samp{gnu.emacs.gnus}. @item foreign @cindex foreign -You can also have any number of foreign groups active at the same time. -These are groups that use non-native non-secondary back ends for getting -news. +You can also have any number of foreign groups active at the same +time. These are groups that use non-native non-secondary back ends +for getting news. Foreign groups have names like +@samp{nntp+news.gmane.org:gmane.emacs.gnus.devel}. @item secondary @cindex secondary -Secondary back ends are somewhere half-way between being native and being -foreign, but they mostly act like they are native. +Secondary back ends are somewhere half-way between being native and +being foreign, but they mostly act like they are native, but they, too +have names like @samp{nntp+news.gmane.org:gmane.emacs.gnus.devel}. @item article @cindex article === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-11 18:30:07 +0000 +++ lisp/gnus/ChangeLog 2011-09-11 22:50:22 +0000 @@ -8,12 +8,23 @@ 2011-09-11 Lars Magne Ingebrigtsen + * gnus-group.el (gnus-group-list-limit): Explain what the command + does. + + * gnus-sum.el (gnus-fetch-headers): Bump message level. + +2011-09-11 Lars Magne Ingebrigtsen + * gnus-dup.el (gnus-dup-suppress-articles): Move "Suppressing duplicates" to a higher level. * gnus-util.el (gnus-verbose): Lower default to 6 to get rid of the most egregious messages. +2011-09-10 Lars Magne Ingebrigtsen + + * gnus-msg.el (gnus-summary-mail-forward): Minuscule doc fix. + 2011-09-10 Tetsuo Tsukamoto (tiny change) * nnrss.el (nnrss-retrieve-groups): Decode the charset before looking === modified file 'lisp/gnus/gnus-agent.el' --- lisp/gnus/gnus-agent.el 2011-08-21 09:39:07 +0000 +++ lisp/gnus/gnus-agent.el 2011-09-11 22:50:22 +0000 @@ -1933,7 +1933,7 @@ (with-current-buffer nntp-server-buffer (if articles (progn - (gnus-message 7 "Fetching headers for %s..." + (gnus-message 8 "Fetching headers for %s..." (gnus-agent-decoded-group-name group)) ;; Fetch them. === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2011-09-10 23:30:53 +0000 +++ lisp/gnus/gnus-group.el 2011-09-11 22:50:22 +0000 @@ -4636,7 +4636,12 @@ (gnus-group-list-plus args))) (defun gnus-group-list-limit (&optional args) - "List groups limited within the current selection." + "List groups limited within the current selection. +If you've limited the groups, you can further limit the selection +with this command. If you've first limited to groups with +dormant articles with `A ?', you can then further limit with +`A / c', which will then limit to groups with cached articles, giving +you the groups that have both dormant articles and cached articles." (interactive "P") (let ((gnus-group-list-option 'limit)) (gnus-group-list-plus args))) === modified file 'lisp/gnus/gnus-msg.el' --- lisp/gnus/gnus-msg.el 2011-08-26 04:25:55 +0000 +++ lisp/gnus/gnus-msg.el 2011-09-11 22:50:22 +0000 @@ -1225,7 +1225,7 @@ if ARG is 4, forward message directly inline; otherwise, use flipped `message-forward-as-mime'. If POST, post instead of mail. -For the `inline' alternatives, also see the variable +For the \"inline\" alternatives, also see the variable `message-forward-ignored-headers'." (interactive "P") (if (cdr (gnus-summary-work-articles nil)) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2011-09-10 23:30:53 +0000 +++ lisp/gnus/gnus-sum.el 2011-09-11 22:50:22 +0000 @@ -5543,7 +5543,7 @@ (defun gnus-fetch-headers (articles &optional limit force-new dependencies) "Fetch headers of ARTICLES." (let ((name (gnus-group-decoded-name gnus-newsgroup-name))) - (gnus-message 5 "Fetching headers for %s..." name) + (gnus-message 7 "Fetching headers for %s..." name) (prog1 (if (eq 'nov (setq gnus-headers-retrieved-by @@ -5560,7 +5560,7 @@ (gnus-get-newsgroup-headers-xover articles force-new dependencies gnus-newsgroup-name t) (gnus-get-newsgroup-headers dependencies force-new)) - (gnus-message 5 "Fetching headers for %s...done" name)))) + (gnus-message 7 "Fetching headers for %s...done" name)))) (defun gnus-select-newsgroup (group &optional read-all select-articles) "Select newsgroup GROUP. ------------------------------------------------------------ revno: 105737 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-09-11 18:04:52 -0400 message: * minibuf.c (Fread_from_minibuffer): Doc fix. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-11 17:40:53 +0000 +++ src/ChangeLog 2011-09-11 22:04:52 +0000 @@ -1,3 +1,7 @@ +2011-09-11 Chong Yidong + + * minibuf.c (Fread_from_minibuffer): Doc fix. + 2011-09-11 Eli Zaretskii * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from === modified file 'src/minibuf.c' --- src/minibuf.c 2011-08-29 15:43:34 +0000 +++ src/minibuf.c 2011-09-11 22:04:52 +0000 @@ -914,12 +914,11 @@ history commands. For consistency, you should also specify that element of the history as the value of INITIAL-CONTENTS. Positions are counted starting from 1 at the beginning of the list. -Sixth arg DEFAULT-VALUE is the default value or the list of default values. - If non-nil, it is available for history commands, and as the value - (or the first element of the list of default values) to return - if the user enters the empty string. But, unless READ is non-nil, - `read-from-minibuffer' does NOT return DEFAULT-VALUE if the user enters - empty input! It returns the empty string. +Sixth arg DEFAULT-VALUE is a default value or list of default values. + If non-nil, it is available via history commands. If READ is + non-nil, it is also the default to `read' if the user enters empty + input. If READ is non-nil, `read-from-minibuffer' does NOT return + DEFAULT-VALUE for empty input! It returns the empty string. Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits the current input method and the setting of `enable-multibyte-characters'. If the variable `minibuffer-allow-text-properties' is non-nil, ------------------------------------------------------------ revno: 105736 fixes bug(s): http://debbugs.gnu.org/276 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-09-11 17:47:39 -0400 message: * frame.el (delete-other-frames): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 20:07:34 +0000 +++ lisp/ChangeLog 2011-09-11 21:47:39 +0000 @@ -5,6 +5,8 @@ (display-buffer-alist, display-buffer-default-action) (display-buffer-overriding-action): Add defcustom types. + * frame.el (delete-other-frames): Doc fix (Bug#276). + 2011-09-11 Lars Magne Ingebrigtsen * play/doctor.el (make-doctor-variables): Define `doctor-sent'. === modified file 'lisp/frame.el' --- lisp/frame.el 2011-07-16 13:02:51 +0000 +++ lisp/frame.el 2011-09-11 21:47:39 +0000 @@ -1457,7 +1457,7 @@ (defun delete-other-frames (&optional frame) - "Delete all frames except FRAME. + "Delete all frames on the current terminal, except FRAME. If FRAME uses another frame's minibuffer, the minibuffer frame is left untouched. FRAME nil or omitted means use the selected frame." (interactive) ------------------------------------------------------------ revno: 105735 committer: Jim Meyering branch nick: trunk timestamp: Sun 2011-09-11 22:27:29 +0200 message: NEWS: fix typo: s/an prefix/a prefix/ diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-09-10 08:26:12 +0000 +++ etc/NEWS 2011-09-11 20:27:29 +0000 @@ -493,7 +493,7 @@ To inhibit this, change `x-select-enable-clipboard-manager' to nil. ** New command `rectangle-number-lines', bound to `C-x r N', numbers -the lines in the current rectangle. With an prefix argument, this +the lines in the current rectangle. With a prefix argument, this prompts for a number to count from and for a format string. ** The command shell prompts for the shell path name, when the default ------------------------------------------------------------ revno: 105734 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-09-11 16:07:34 -0400 message: Add defcustom definitions for display-buffer vars. * lisp/window.el (display-buffer--action-function-custom-type) (display-buffer--action-custom-type): New vars. (display-buffer-alist, display-buffer-default-action) (display-buffer-overriding-action): Add defcustom types. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 19:07:41 +0000 +++ lisp/ChangeLog 2011-09-11 20:07:34 +0000 @@ -1,3 +1,10 @@ +2011-09-11 Chong Yidong + + * window.el (display-buffer--action-function-custom-type) + (display-buffer--action-custom-type): New vars. + (display-buffer-alist, display-buffer-default-action) + (display-buffer-overriding-action): Add defcustom types. + 2011-09-11 Lars Magne Ingebrigtsen * play/doctor.el (make-doctor-variables): Define `doctor-sent'. === modified file 'lisp/window.el' --- lisp/window.el 2011-09-11 18:30:07 +0000 +++ lisp/window.el 2011-09-11 20:07:34 +0000 @@ -4498,7 +4498,33 @@ buffer)) (current-buffer))) -(defvar display-buffer-alist nil +(defconst display-buffer--action-function-custom-type + '(choice :tag "Function" + (const :tag "--" ignore) ; default for insertion + (const display-buffer--maybe-same-window) + (const display-buffer-reuse-window) + (const display-buffer--special) + (const display-buffer--maybe-pop-up-frame-or-window) + (const display-buffer-use-some-window) + (const display-buffer-same-window) + (const display-buffer-pop-up-frame) + (const display-buffer-use-some-window) + (function :tag "Other function")) + "Custom type for `display-buffer' action functions.") + +(defconst display-buffer--action-custom-type + `(cons :tag "Action" + (choice :tag "Action functions" + ,display-buffer--action-function-custom-type + (repeat + :tag "List of functions" + ,display-buffer--action-function-custom-type)) + (alist :tag "Action arguments" + :key-type symbol + :value-type (sexp :tag "Value"))) + "Custom type for `display-buffer' actions.") + +(defcustom display-buffer-alist nil "Alist of conditional actions for `display-buffer'. This is a list of elements (CONDITION . ACTION), where: @@ -4508,10 +4534,17 @@ ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a function or a list of functions. Each such function should accept 2 arguments: a buffer to display and an alist of the - same form as ALIST. See `display-buffer' for details.") -(put 'display-buffer-alist 'risky-local-variable t) + same form as ALIST. See `display-buffer' for details." + :type `(alist :key-type + (choice :tag "Condition" + regexp + (function :tag "Matcher function")) + :value-type ,display-buffer--action-custom-type) + :risky t + :version "24.1" + :group 'windows) -(defvar display-buffer-default-action +(defcustom display-buffer-default-action '((display-buffer--maybe-same-window display-buffer-reuse-window display-buffer--special @@ -4522,17 +4555,23 @@ "List of default actions for `display-buffer'. It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a function or a list of functions. Each function should accept 2 -arguments: a buffer to display and an alist of the same form as -ALIST. See `display-buffer' for details.") -(put 'display-buffer-default-action 'risky-local-variable t) +arguments: a buffer to display and an alist similar to ALIST. +See `display-buffer' for details." + :type display-buffer--action-custom-type + :risky t + :version "24.1" + :group 'windows) -(defvar display-buffer-overriding-action nil +(defcustom display-buffer-overriding-action '(nil . nil) "Overriding action to perform to display a buffer. -If non-nil, it should be a cons cell (FUNCTION . ALIST), where -FUNCTION is a function or a list of functions. Each function -should accept 2 arguments: a buffer to display and an alist of -the same form as ALIST. See `display-buffer' for details.") -(put 'display-buffer-overriding-action 'risky-local-variable t) +It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a +function or a list of functions. Each function should accept 2 +arguments: a buffer to display and an alist similar to ALIST. +See `display-buffer' for details." + :type display-buffer--action-custom-type + :risky t + :version "24.1" + :group 'windows) (defun display-buffer-assq-regexp (buffer-name alist) "Retrieve ALIST entry corresponding to BUFFER-NAME." @@ -4571,7 +4610,7 @@ FUNCTION is either a function or a list of functions. Each such function is called with 2 arguments: the buffer to display and an alist. It should either display the buffer and return the -window, or return nil if it is unable to display the buffer. +window, or return nil if unable to display the buffer. `display-buffer' builds a function list and an alist from `display-buffer-overriding-action', `display-buffer-alist', ------------------------------------------------------------ revno: 105733 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 21:07:41 +0200 message: * play/doctor.el (make-doctor-variables): Define `doctor-sent'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 18:30:07 +0000 +++ lisp/ChangeLog 2011-09-11 19:07:41 +0000 @@ -1,3 +1,7 @@ +2011-09-11 Lars Magne Ingebrigtsen + + * play/doctor.el (make-doctor-variables): Define `doctor-sent'. + 2011-09-11 Chong Yidong Change modes that used same-window-* vars to use switch-to-buffer. === modified file 'lisp/play/doctor.el' --- lisp/play/doctor.el 2011-04-23 03:07:16 +0000 +++ lisp/play/doctor.el 2011-09-11 19:07:41 +0000 @@ -163,6 +163,7 @@ (you7re you\'re (i am)) (you7ve you\'ve (i have)) (you7ll you\'ll (i will))))) + (set (make-local-variable 'doctor-sent) nil) (set (make-local-variable 'doctor-found) nil) (set (make-local-variable 'doctor-owner) nil) (set (make-local-variable 'doctor--history) nil) ------------------------------------------------------------ revno: 105732 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-09-11 14:30:07 -0400 message: Change modes that used same-window-* vars to use switch-to-buffer. * cmuscheme.el (run-scheme, switch-to-scheme): * ielm.el (ielm): * shell.el (shell): * net/rlogin.el (rlogin): * net/telnet.el (telnet, rsh): * progmodes/inf-lisp.el (inferior-lisp): Use switch-to-buffer. * cus-edit.el (customize-group, custom-buffer-create) (customize-browse, custom-buffer-create-other-window): Use switch-to-buffer or switch-to-buffer-other-window. * info.el (info, Info-find-node, Info-revert-find-node, Info-next) (Info-prev, Info-up, Info-speedbar-goto-node) (info-display-manual): Use switch-to-buffer. (Info-speedbar-goto-node): Use switch-to-buffer-other-frame. * lisp/gnus/message.el (message-pop-to-buffer): Default to switch-to-buffer. (message-mail-other-window, message-mail-other-frame) (message-news-other-window, message-news-other-frame): Use switch-to-buffer-other-frame and switch-to-buffer-other-window instead of setting buffer display varibles. * mail/sendmail.el (mail): Use switch-to-buffer. (mail-recover): Use switch-to-buffer-other-window. * progmodes/gdb-mi.el (gdb-restore-windows, gdb-setup-windows): Use switch-to-buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 17:08:17 +0000 +++ lisp/ChangeLog 2011-09-11 18:30:07 +0000 @@ -1,3 +1,29 @@ +2011-09-11 Chong Yidong + + Change modes that used same-window-* vars to use switch-to-buffer. + + * progmodes/gdb-mi.el (gdb-restore-windows, gdb-setup-windows): + Use switch-to-buffer. + + * cus-edit.el (customize-group, custom-buffer-create) + (customize-browse, custom-buffer-create-other-window): Use + switch-to-buffer or switch-to-buffer-other-window. + + * info.el (info, Info-find-node, Info-revert-find-node, Info-next) + (Info-prev, Info-up, Info-speedbar-goto-node) + (info-display-manual): Use switch-to-buffer. + (Info-speedbar-goto-node): Use switch-to-buffer-other-frame. + + * mail/sendmail.el (mail): Use switch-to-buffer. + (mail-recover): Use switch-to-buffer-other-window. + + * cmuscheme.el (run-scheme, switch-to-scheme): + * ielm.el (ielm): + * shell.el (shell): + * net/rlogin.el (rlogin): + * net/telnet.el (telnet, rsh): + * progmodes/inf-lisp.el (inferior-lisp): Use switch-to-buffer. + 2011-09-11 Andreas Schwab * dired.el (dired-sort-toggle-or-edit): Revert last changes. === modified file 'lisp/cmuscheme.el' --- lisp/cmuscheme.el 2011-09-10 18:52:37 +0000 +++ lisp/cmuscheme.el 2011-09-11 18:30:07 +0000 @@ -246,7 +246,7 @@ (inferior-scheme-mode))) (setq scheme-program-name cmd) (setq scheme-buffer "*scheme*") - (pop-to-buffer "*scheme*")) + (switch-to-buffer "*scheme*")) (defun scheme-start-file (prog) "Return the name of the start file corresponding to PROG. @@ -371,7 +371,7 @@ (interactive "P") (if (or (and scheme-buffer (get-buffer scheme-buffer)) (scheme-interactively-start-process)) - (pop-to-buffer scheme-buffer) + (switch-to-buffer scheme-buffer) (error "No current process buffer. See variable `scheme-buffer'")) (when eob-p (push-mark) === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2011-09-10 20:14:02 +0000 +++ lisp/cus-edit.el 2011-09-11 18:30:07 +0000 @@ -1112,7 +1112,7 @@ (let ((name (format "*Customize Group: %s*" (custom-unlispify-tag-name group)))) (if (get-buffer name) - (pop-to-buffer name other-window) + (switch-to-buffer name other-window) (funcall (if other-window 'custom-buffer-create-other-window 'custom-buffer-create) @@ -1533,7 +1533,7 @@ OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where SYMBOL is a customization option, and WIDGET is a widget for editing that option." - (pop-to-buffer (custom-get-fresh-buffer (or name "*Customization*"))) + (switch-to-buffer (custom-get-fresh-buffer (or name "*Customization*"))) (custom-buffer-create-internal options description)) ;;;###autoload @@ -1545,7 +1545,7 @@ SYMBOL is a customization option, and WIDGET is a widget for editing that option." (unless name (setq name "*Customization*")) - (pop-to-buffer (custom-get-fresh-buffer name) t) + (switch-to-buffer-other-window (custom-get-fresh-buffer name)) (custom-buffer-create-internal options description)) (defcustom custom-reset-button-menu nil @@ -1721,7 +1721,7 @@ (unless group (setq group 'emacs)) (let ((name "*Customize Browser*")) - (pop-to-buffer (custom-get-fresh-buffer name))) + (switch-to-buffer (custom-get-fresh-buffer name))) (Custom-mode) (widget-insert (format "\ %s buttons; type RET or click mouse-1 === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-11 16:15:00 +0000 +++ lisp/gnus/ChangeLog 2011-09-11 18:30:07 +0000 @@ -1,3 +1,11 @@ +2011-09-11 Chong Yidong + + * message.el (message-pop-to-buffer): Default to switch-to-buffer. + (message-mail-other-window, message-mail-other-frame) + (message-news-other-window, message-news-other-frame): Use + switch-to-buffer-other-frame and switch-to-buffer-other-window instead + of setting buffer display varibles. + 2011-09-11 Lars Magne Ingebrigtsen * gnus-dup.el (gnus-dup-suppress-articles): Move "Suppressing === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2011-09-09 08:59:51 +0000 +++ lisp/gnus/message.el 2011-09-11 18:30:07 +0000 @@ -6329,7 +6329,7 @@ (progn (gnus-select-frame-set-input-focus (window-frame window)) (select-window window)) - (funcall (or switch-function 'pop-to-buffer) buffer) + (funcall (or switch-function 'switch-to-buffer) buffer) (set-buffer buffer)) (when (and (buffer-modified-p) (not (prog1 @@ -6337,7 +6337,7 @@ "Message already being composed; erase? ") (message nil)))) (error "Message being composed"))) - (funcall (or switch-function 'pop-to-buffer) name) + (funcall (or switch-function 'switch-to-buffer) name) (set-buffer name)) (erase-buffer) (message-mode))) @@ -7619,12 +7619,8 @@ "Like `message-mail' command, but display mail buffer in another window." (interactive) (unless (message-mail-user-agent) - (let ((pop-up-windows t) - (special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (message-pop-to-buffer (message-buffer-name "mail" to)))) + (message-pop-to-buffer (message-buffer-name "mail" to) + 'switch-to-buffer-other-window)) (let ((message-this-is-mail t)) (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) nil nil nil 'switch-to-buffer-other-window))) @@ -7634,12 +7630,8 @@ "Like `message-mail' command, but display mail buffer in another frame." (interactive) (unless (message-mail-user-agent) - (let ((pop-up-frames t) - (special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (message-pop-to-buffer (message-buffer-name "mail" to)))) + (message-pop-to-buffer (message-buffer-name "mail" to) + 'switch-to-buffer-other-frame)) (let ((message-this-is-mail t)) (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) nil nil nil 'switch-to-buffer-other-frame))) @@ -7648,12 +7640,8 @@ (defun message-news-other-window (&optional newsgroups subject) "Start editing a news article to be sent." (interactive) - (let ((pop-up-windows t) - (special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups))) + (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups) + 'switch-to-buffer-other-window) (let ((message-this-is-news t)) (message-setup `((Newsgroups . ,(or newsgroups "")) (Subject . ,(or subject "")))))) @@ -7662,12 +7650,8 @@ (defun message-news-other-frame (&optional newsgroups subject) "Start editing a news article to be sent." (interactive) - (let ((pop-up-frames t) - (special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups))) + (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups) + 'switch-to-buffer-other-frame) (let ((message-this-is-news t)) (message-setup `((Newsgroups . ,(or newsgroups "")) (Subject . ,(or subject "")))))) === modified file 'lisp/ielm.el' --- lisp/ielm.el 2011-09-10 18:52:37 +0000 +++ lisp/ielm.el 2011-09-11 18:30:07 +0000 @@ -563,7 +563,7 @@ (with-current-buffer (get-buffer-create "*ielm*") (unless (zerop (buffer-size)) (setq old-point (point))) (inferior-emacs-lisp-mode))) - (pop-to-buffer "*ielm*") + (switch-to-buffer "*ielm*") (when old-point (push-mark old-point)))) (provide 'ielm) === modified file 'lisp/info.el' --- lisp/info.el 2011-09-10 20:14:02 +0000 +++ lisp/info.el 2011-09-11 18:30:07 +0000 @@ -610,7 +610,7 @@ "Like `info' but show the Info buffer in another window." (interactive (if current-prefix-arg (list (read-file-name "Info file name: " nil nil t)))) - (info-setup file-or-node (pop-to-buffer "*info*" t))) + (info-setup file-or-node (switch-to-buffer-other-window "*info*"))) ;;;###autoload (put 'info 'info-file (purecopy "emacs")) ;;;###autoload @@ -640,7 +640,7 @@ (read-file-name "Info file name: " nil nil t)) (if (numberp current-prefix-arg) (format "*info*<%s>" current-prefix-arg)))) - (info-setup file-or-node (pop-to-buffer (or buffer "*info*")))) + (info-setup file-or-node (switch-to-buffer (or buffer "*info*")))) (defun info-setup (file-or-node buffer) "Display Info node FILE-OR-NODE in BUFFER." @@ -775,7 +775,7 @@ (info-initialize) (setq filename (Info-find-file filename)) ;; Go into Info buffer. - (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) + (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) ;; Record the node we are leaving, if we were in one. (and (not no-going-back) Info-current-file @@ -809,7 +809,7 @@ "Go to an Info node FILENAME and NODENAME, re-reading disk contents. When *info* is already displaying FILENAME and NODENAME, the window position is preserved, if possible." - (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) + (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) (let ((old-filename Info-current-file) (old-nodename Info-current-node) (old-buffer-name (buffer-name)) @@ -821,7 +821,7 @@ (new-history (and Info-current-file (list Info-current-file Info-current-node (point))))) (kill-buffer (current-buffer)) - (pop-to-buffer (or old-buffer-name "*info*")) + (switch-to-buffer (or old-buffer-name "*info*")) (Info-mode) (Info-find-node filename nodename) (setq Info-history-forward old-history-forward) @@ -2021,7 +2021,7 @@ (interactive) ;; In case another window is currently selected (save-window-excursion - (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) + (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) (Info-goto-node (Info-extract-pointer "next")))) (defun Info-prev () @@ -2029,7 +2029,7 @@ (interactive) ;; In case another window is currently selected (save-window-excursion - (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) + (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous")))) (defun Info-up (&optional same-file) @@ -2038,7 +2038,7 @@ (interactive) ;; In case another window is currently selected (save-window-excursion - (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) + (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*")) (let ((old-node Info-current-node) (old-file Info-current-file) (node (Info-extract-pointer "up")) p) @@ -4775,7 +4775,7 @@ (select-window bwin) (raise-frame (window-frame bwin))) (if speedbar-power-click - (let ((pop-up-frames t)) (select-window (display-buffer buff))) + (switch-to-buffer-other-frame buff) (speedbar-select-attached-frame) (switch-to-buffer buff))) (if (not (string-match "^(\\([^)]+\\))\\([^.]+\\)$" node)) @@ -4954,7 +4954,7 @@ (setq found buffer blist nil)))) (if found - (pop-to-buffer found) + (switch-to-buffer found) (info-initialize) (info (Info-find-file manual))))) === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2011-09-10 21:15:28 +0000 +++ lisp/mail/sendmail.el 2011-09-11 18:30:07 +0000 @@ -1785,11 +1785,11 @@ This is how Rmail arranges to mark messages `answered'." (interactive "P") (if (eq noerase 'new) - (pop-to-buffer (generate-new-buffer "*mail*")) + (switch-to-buffer (generate-new-buffer "*mail*")) (and noerase (not (get-buffer "*mail*")) (setq noerase nil)) - (pop-to-buffer "*mail*")) + (switch-to-buffer "*mail*")) ;; Avoid danger that the auto-save file can't be written. (let ((dir (expand-file-name @@ -1939,7 +1939,7 @@ (dired-noselect file-name (concat dired-listing-switches " -t")))) (save-selected-window - (select-window (display-buffer dispbuf t)) + (switch-to-buffer-other-window dispbuf) (goto-char (point-min)) (forward-line 2) (dired-move-to-filename) === modified file 'lisp/net/rlogin.el' --- lisp/net/rlogin.el 2011-09-10 18:52:37 +0000 +++ lisp/net/rlogin.el 2011-09-11 18:30:07 +0000 @@ -194,7 +194,7 @@ (t (setq buffer-name (generate-new-buffer-name buffer-name)))) (setq buffer (get-buffer-create buffer-name)) - (pop-to-buffer buffer-name) + (switch-to-buffer buffer-name) (unless (comint-check-proc buffer-name) (comint-exec buffer buffer-name rlogin-program nil args) (rlogin-mode) === modified file 'lisp/net/telnet.el' --- lisp/net/telnet.el 2011-09-10 18:52:37 +0000 +++ lisp/net/telnet.el 2011-09-11 18:30:07 +0000 @@ -217,8 +217,8 @@ (telnet-options (if (cdr properties) (cons "-l" (cdr properties)))) process) (if (and buffer (get-buffer-process buffer)) - (pop-to-buffer (concat "*" name "*")) - (pop-to-buffer + (switch-to-buffer (concat "*" name "*")) + (switch-to-buffer (apply 'make-comint name telnet-program nil telnet-options)) (setq process (get-buffer-process (current-buffer))) (set-process-filter process 'telnet-initial-filter) @@ -252,7 +252,7 @@ (interactive "sOpen rsh connection to host: ") (require 'shell) (let ((name (concat "rsh-" host ))) - (pop-to-buffer (make-comint name remote-shell-program nil host)) + (switch-to-buffer (make-comint name remote-shell-program nil host)) (set-process-filter (get-process name) 'telnet-initial-filter) (telnet-mode) (setq telnet-count -16))) === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2011-09-10 21:15:28 +0000 +++ lisp/progmodes/gdb-mi.el 2011-09-11 18:30:07 +0000 @@ -4006,7 +4006,7 @@ (gdb-display-breakpoints-buffer) (delete-other-windows) ;; Don't dedicate. - (pop-to-buffer gud-comint-buffer) + (switch-to-buffer gud-comint-buffer) (let ((win0 (selected-window)) (win1 (split-window nil ( / ( * (window-height) 3) 4))) (win2 (split-window nil ( / (window-height) 3))) @@ -4065,7 +4065,7 @@ "Restore the basic arrangement of windows used by gdb. This arrangement depends on the value of `gdb-many-windows'." (interactive) - (pop-to-buffer gud-comint-buffer) ;Select the right window and frame. + (switch-to-buffer gud-comint-buffer) ;Select the right window and frame. (delete-other-windows) (if gdb-many-windows (gdb-setup-windows) === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2011-09-10 21:15:28 +0000 +++ lisp/progmodes/gud.el 2011-09-11 18:30:07 +0000 @@ -2496,7 +2496,7 @@ file-subst))) (filepart (and file-word (concat "-" (file-name-nondirectory file)))) (existing-buffer (get-buffer (concat "*gud" filepart "*")))) - (pop-to-buffer (concat "*gud" filepart "*")) + (switch-to-buffer (concat "*gud" filepart "*")) (when (and existing-buffer (get-buffer-process existing-buffer)) (error "This program is already being debugged")) ;; Set the dir, in case the buffer already existed with a different dir. === modified file 'lisp/progmodes/inf-lisp.el' --- lisp/progmodes/inf-lisp.el 2011-09-10 18:52:37 +0000 +++ lisp/progmodes/inf-lisp.el 2011-09-11 18:30:07 +0000 @@ -297,7 +297,7 @@ "inferior-lisp" (car cmdlist) nil (cdr cmdlist))) (inferior-lisp-mode))) (setq inferior-lisp-buffer "*inferior-lisp*") - (pop-to-buffer "*inferior-lisp*")) + (switch-to-buffer "*inferior-lisp*")) ;;;###autoload (defalias 'run-lisp 'inferior-lisp) === modified file 'lisp/shell.el' --- lisp/shell.el 2011-09-10 18:52:37 +0000 +++ lisp/shell.el 2011-09-11 18:30:07 +0000 @@ -650,9 +650,9 @@ t shell-file-name)) 'localname)))) - ;; Pop to buffer, so that the buffer's window will be correctly set - ;; when we call comint (so that comint sets the COLUMNS env var properly). - (pop-to-buffer buffer) + ;; The buffer's window must be correctly set when we call comint (so + ;; that comint sets the COLUMNS env var properly). + (switch-to-buffer buffer) (unless (comint-check-proc buffer) (let* ((prog (or explicit-shell-file-name (getenv "ESHELL") shell-file-name)) === modified file 'lisp/window.el' --- lisp/window.el 2011-09-10 21:15:28 +0000 +++ lisp/window.el 2011-09-11 18:30:07 +0000 @@ -4498,11 +4498,7 @@ buffer)) (current-buffer))) -(defvar display-buffer-alist - '(("\\`\\*\\(scheme\\|ielm\\|shell\\|\\(unsent \\)?mail\\|\ -inferior-lisp\\|Python\\|Customiz.*\\|info\\|rlogin-.*\\|\ -telnet-.*\\|rsh-.*\\|gud-.*\\)\\*\\(<[0-9]+>\\)?" - . (display-buffer-same-window))) +(defvar display-buffer-alist nil "Alist of conditional actions for `display-buffer'. This is a list of elements (CONDITION . ACTION), where: ------------------------------------------------------------ revno: 105731 fixes bug(s): http://debbugs.gnu.org/9475 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2011-09-11 20:40:53 +0300 message: Fix bug #9475 with alignment in *Completions* buffer. src/xdisp.c (produce_stretch_glyph): Fix a typo made in changes from 2011-08-30 (revision 105619). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-11 14:46:38 +0000 +++ src/ChangeLog 2011-09-11 17:40:53 +0000 @@ -1,3 +1,8 @@ +2011-09-11 Eli Zaretskii + + * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from + 2011-08-30 (revision 105619). (Bug#9475) + 2011-09-11 Lars Magne Ingebrigtsen * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a === modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-10 15:23:25 +0000 +++ src/xdisp.c 2011-09-11 17:40:53 +0000 @@ -23251,6 +23251,7 @@ if (FRAME_WINDOW_P (it->f)) { append_stretch_glyph (it, object, width, height, ascent); + it->pixel_width = width; it->ascent = it->phys_ascent = ascent; it->descent = it->phys_descent = height - it->ascent; it->nglyphs = width > 0 && height > 0 ? 1 : 0; @@ -23265,7 +23266,6 @@ while (n--) tty_append_glyph (it); it->object = o_object; - it->pixel_width = width; } } } ------------------------------------------------------------ revno: 105730 committer: Andreas Schwab branch nick: emacs timestamp: Sun 2011-09-11 19:08:17 +0200 message: * lisp/dired.el (dired-sort-toggle-or-edit): Revert last changes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 17:00:14 +0000 +++ lisp/ChangeLog 2011-09-11 17:08:17 +0000 @@ -1,3 +1,7 @@ +2011-09-11 Andreas Schwab + + * dired.el (dired-sort-toggle-or-edit): Revert last changes. + 2011-09-11 Lars Magne Ingebrigtsen * dired.el (dired-sort-toggle-or-edit): -o doesn't exist on *BSD, === modified file 'lisp/dired.el' --- lisp/dired.el 2011-09-11 17:00:14 +0000 +++ lisp/dired.el 2011-09-11 17:08:17 +0000 @@ -3413,8 +3413,7 @@ (error "Cannot sort this dired buffer")) (if arg (dired-sort-other - (read-string "ls switches (must contain -l or similar): " - dired-actual-switches)) + (read-string "ls switches (must contain -l): " dired-actual-switches)) (dired-sort-toggle))) (defun dired-sort-toggle () ------------------------------------------------------------ revno: 105729 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 19:00:14 +0200 message: (dired-sort-toggle-or-edit): Clarify string further. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 14:54:49 +0000 +++ lisp/ChangeLog 2011-09-11 17:00:14 +0000 @@ -2,6 +2,7 @@ * dired.el (dired-sort-toggle-or-edit): -o doesn't exist on *BSD, so don't mention it (bug#9301). + (dired-sort-toggle-or-edit): Clarify string further. * faces.el (face-spec-set-match-display): Make `(type graphic)' match `x', `w32' and `ns', like the manual says (bug#9029). === modified file 'lisp/dired.el' --- lisp/dired.el 2011-09-11 14:54:49 +0000 +++ lisp/dired.el 2011-09-11 17:00:14 +0000 @@ -3413,7 +3413,7 @@ (error "Cannot sort this dired buffer")) (if arg (dired-sort-other - (read-string "ls switches (must contain -l or -g): " + (read-string "ls switches (must contain -l or similar): " dired-actual-switches)) (dired-sort-toggle))) ------------------------------------------------------------ revno: 105728 [merge] committer: Paul Eggert branch nick: trunk timestamp: Sun 2011-09-11 09:55:41 -0700 message: Merge from gnulib, porting to Tru64. * lib/lstat.c, lib/stat.c, m4/include_next.m4, m4/nocrash.m4: * m4/signal_h.m4, m4/time_h.m4, m4/unistd_h.m4: Merge from gnulib. This fixes a compilation error on Tru64 UNIX aka OSF/1 5.1 DTK cc. There is also some mingw stuff here that doesn't affect Emacs. diff: === modified file 'ChangeLog' --- ChangeLog 2011-09-06 20:47:45 +0000 +++ ChangeLog 2011-09-11 16:52:58 +0000 @@ -1,3 +1,12 @@ +2011-09-11 Paul Eggert + + Merge from gnulib, porting to Tru64. + * lib/lstat.c, lib/stat.c, m4/include_next.m4, m4/nocrash.m4: + * m4/signal_h.m4, m4/time_h.m4, m4/unistd_h.m4: + Merge from gnulib. This fixes a compilation error on Tru64 UNIX + aka OSF/1 5.1 DTK cc. There is also some mingw stuff here that + doesn't affect Emacs. + 2011-09-06 Paul Eggert * configure.in (isnan): Remove now-unnecessary check. === modified file 'lib/lstat.c' --- lib/lstat.c 2011-09-03 23:08:32 +0000 +++ lib/lstat.c 2011-09-11 16:52:58 +0000 @@ -42,7 +42,10 @@ } /* Specification. */ -# include +/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include + above. */ +# include "sys/stat.h" # include # include === modified file 'lib/stat.c' --- lib/stat.c 2011-09-03 23:08:32 +0000 +++ lib/stat.c 2011-09-11 16:52:58 +0000 @@ -34,7 +34,10 @@ } /* Specification. */ -#include +/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include + above. */ +#include "sys/stat.h" #include #include === modified file 'm4/include_next.m4' --- m4/include_next.m4 2011-07-28 16:35:19 +0000 +++ m4/include_next.m4 2011-09-11 16:52:58 +0000 @@ -1,4 +1,4 @@ -# include_next.m4 serial 20 +# include_next.m4 serial 21 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -207,17 +207,34 @@ aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac +changequote(,) + case "$host_os" in + mingw*) + dnl For the sake of native Windows compilers (excluding gcc), + dnl treat backslash as a directory separator, like /. + dnl Actually, these compilers use a double-backslash as + dnl directory separator, inside the + dnl # line "filename" + dnl directives. + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='/' + ;; + esac +changequote([,]) + gl_absolute_header_sed='\#'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[#{ + s#.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*#\1# + s#^/[^/]#//&# + p + q + }' dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. AS_VAR_SET(gl_next_header, ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ - s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"']) + sed -n "$gl_absolute_header_sed"`'"']) m4_if([$2], [check], [else AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) === modified file 'm4/nocrash.m4' --- m4/nocrash.m4 2011-07-24 22:15:47 +0000 +++ m4/nocrash.m4 2011-09-11 16:52:58 +0000 @@ -1,4 +1,4 @@ -# nocrash.m4 serial 2 +# nocrash.m4 serial 3 dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -79,6 +79,34 @@ } } } +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Avoid a crash on native Windows. */ +#define WIN32_LEAN_AND_MEAN +#include +#include +static LONG WINAPI +exception_filter (EXCEPTION_POINTERS *ExceptionInfo) +{ + switch (ExceptionInfo->ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + case EXCEPTION_IN_PAGE_ERROR: + case EXCEPTION_STACK_OVERFLOW: + case EXCEPTION_GUARD_PAGE: + case EXCEPTION_PRIV_INSTRUCTION: + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_NONCONTINUABLE_EXCEPTION: + exit (1); + } + return EXCEPTION_CONTINUE_SEARCH; +} +static void +nocrash_init (void) +{ + SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); +} #else /* Avoid a crash on POSIX systems. */ #include === modified file 'm4/signal_h.m4' --- m4/signal_h.m4 2011-07-08 20:20:19 +0000 +++ m4/signal_h.m4 2011-09-11 16:52:58 +0000 @@ -1,4 +1,4 @@ -# signal_h.m4 serial 16 +# signal_h.m4 serial 17 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -17,6 +17,9 @@ #include ]]) + dnl Ensure the type pid_t gets defined. + AC_REQUIRE([AC_TYPE_PID_T]) + AC_REQUIRE([AC_TYPE_UID_T]) dnl Persuade glibc to define sighandler_t. === modified file 'm4/time_h.m4' --- m4/time_h.m4 2011-01-22 00:12:10 +0000 +++ m4/time_h.m4 2011-09-11 16:52:58 +0000 @@ -2,7 +2,7 @@ # Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. -# serial 4 +# serial 5 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -23,6 +23,9 @@ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) + + dnl Ensure the type pid_t gets defined. + AC_REQUIRE([AC_TYPE_PID_T]) ]) dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared === modified file 'm4/unistd_h.m4' --- m4/unistd_h.m4 2011-05-18 00:39:40 +0000 +++ m4/unistd_h.m4 2011-09-11 16:52:58 +0000 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 56 +# unistd_h.m4 serial 57 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -21,6 +21,9 @@ fi AC_SUBST([HAVE_UNISTD_H]) + dnl Ensure the type pid_t gets defined. + AC_REQUIRE([AC_TYPE_PID_T]) + dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include ------------------------------------------------------------ revno: 105727 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 18:15:00 +0200 message: * gnus-dup.el (gnus-dup-suppress-articles): Move "Suppressing duplicates" to a higher level. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-11 16:12:42 +0000 +++ lisp/gnus/ChangeLog 2011-09-11 16:15:00 +0000 @@ -1,5 +1,8 @@ 2011-09-11 Lars Magne Ingebrigtsen + * gnus-dup.el (gnus-dup-suppress-articles): Move "Suppressing + duplicates" to a higher level. + * gnus-util.el (gnus-verbose): Lower default to 6 to get rid of the most egregious messages. === modified file 'lisp/gnus/gnus-dup.el' --- lisp/gnus/gnus-dup.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/gnus-dup.el 2011-09-11 16:15:00 +0000 @@ -131,7 +131,7 @@ "Mark duplicate articles as read." (unless gnus-dup-list (gnus-dup-open)) - (gnus-message 6 "Suppressing duplicates...") + (gnus-message 8 "Suppressing duplicates...") (let ((auto (and gnus-newsgroup-auto-expire (memq gnus-duplicate-mark gnus-auto-expirable-marks))) number) @@ -145,7 +145,7 @@ (push (cons number gnus-duplicate-mark) gnus-newsgroup-reads) (push number gnus-newsgroup-expirable) (push (cons number gnus-expirable-mark) gnus-newsgroup-reads))))) - (gnus-message 6 "Suppressing duplicates...done")) + (gnus-message 8 "Suppressing duplicates...done")) (defun gnus-dup-unsuppress-article (article) "Stop suppression of ARTICLE." ------------------------------------------------------------ revno: 105726 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 18:12:42 +0200 message: (gnus-verbose): Lower default to 6 to get rid of the most egregious messages. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-11 08:20:33 +0000 +++ lisp/gnus/ChangeLog 2011-09-11 16:12:42 +0000 @@ -1,3 +1,8 @@ +2011-09-11 Lars Magne Ingebrigtsen + + * gnus-util.el (gnus-verbose): Lower default to 6 to get rid of the + most egregious messages. + 2011-09-10 Tetsuo Tsukamoto (tiny change) * nnrss.el (nnrss-retrieve-groups): Decode the charset before looking === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2011-08-21 09:39:07 +0000 +++ lisp/gnus/gnus-util.el 2011-09-11 16:12:42 +0000 @@ -471,12 +471,13 @@ (setq i (* 2 i))) i)) -(defcustom gnus-verbose 7 +(defcustom gnus-verbose 6 "*Integer that says how verbose Gnus should be. The higher the number, the more messages Gnus will flash to say what it's doing. At zero, Gnus will be totally mute; at five, Gnus will display most important messages; and at ten, Gnus will keep on jabbering all the time." + :version "24.1" :group 'gnus-start :type 'integer) ------------------------------------------------------------ revno: 105725 fixes bug(s): http://debbugs.gnu.org/9301 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 16:54:49 +0200 message: -o doesn't exist on *BSD, so don't mention it diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 04:28:07 +0000 +++ lisp/ChangeLog 2011-09-11 14:54:49 +0000 @@ -1,5 +1,8 @@ 2011-09-11 Lars Magne Ingebrigtsen + * dired.el (dired-sort-toggle-or-edit): -o doesn't exist on *BSD, + so don't mention it (bug#9301). + * faces.el (face-spec-set-match-display): Make `(type graphic)' match `x', `w32' and `ns', like the manual says (bug#9029). === modified file 'lisp/dired.el' --- lisp/dired.el 2011-09-11 02:29:23 +0000 +++ lisp/dired.el 2011-09-11 14:54:49 +0000 @@ -3413,7 +3413,8 @@ (error "Cannot sort this dired buffer")) (if arg (dired-sort-other - (read-string "ls switches (must contain -l, -o, or -g): " dired-actual-switches)) + (read-string "ls switches (must contain -l or -g): " + dired-actual-switches)) (dired-sort-toggle))) (defun dired-sort-toggle () ------------------------------------------------------------ revno: 105724 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 16:49:24 +0200 message: Clarify slightly the last checkin. diff: === modified file 'src/fileio.c' --- src/fileio.c 2011-09-11 14:46:38 +0000 +++ src/fileio.c 2011-09-11 14:49:24 +0000 @@ -5048,7 +5048,7 @@ The value is a list of the form (HIGH LOW), like the time values that `file-attributes' returns. If the current buffer has no recorded file modification time, this function returns 0. If the visited file -doesn't exist, `(-1 65535)' will be returned. +doesn't exist, HIGH will be -1. See Info node `(elisp)Modification Time' for more details. */) (void) { ------------------------------------------------------------ revno: 105723 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 16:46:38 +0200 message: (Fvisited_file_modtime): Document `(-1 65535)' as a value for non-existent files. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-11 05:52:07 +0000 +++ src/ChangeLog 2011-09-11 14:46:38 +0000 @@ -1,3 +1,8 @@ +2011-09-11 Lars Magne Ingebrigtsen + + * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a + value for non-existent files. + 2011-09-11 Eli Zaretskii * fileio.c (Finsert_file_contents): If the file cannot be opened, === modified file 'src/fileio.c' --- src/fileio.c 2011-09-11 05:52:07 +0000 +++ src/fileio.c 2011-09-11 14:46:38 +0000 @@ -5045,9 +5045,10 @@ DEFUN ("visited-file-modtime", Fvisited_file_modtime, Svisited_file_modtime, 0, 0, 0, doc: /* Return the current buffer's recorded visited file modification time. -The value is a list of the form (HIGH LOW), like the time values -that `file-attributes' returns. If the current buffer has no recorded -file modification time, this function returns 0. +The value is a list of the form (HIGH LOW), like the time values that +`file-attributes' returns. If the current buffer has no recorded file +modification time, this function returns 0. If the visited file +doesn't exist, `(-1 65535)' will be returned. See Info node `(elisp)Modification Time' for more details. */) (void) { ------------------------------------------------------------ revno: 105722 author: Tetsuo Tsukamoto committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2011-09-11 08:20:33 +0000 message: nnrss.el (nnrss-retrieve-groups): Decode the charset before looking up the file (bug#9351). diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-10 23:30:53 +0000 +++ lisp/gnus/ChangeLog 2011-09-11 08:20:33 +0000 @@ -1,3 +1,8 @@ +2011-09-10 Tetsuo Tsukamoto (tiny change) + + * nnrss.el (nnrss-retrieve-groups): Decode the charset before looking + up the file (bug#9351). + 2011-09-10 Lars Magne Ingebrigtsen * nnimap.el: Redo the charset handling. Let Gnus encode the names, as === modified file 'lisp/gnus/nnrss.el' --- lisp/gnus/nnrss.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/nnrss.el 2011-09-11 08:20:33 +0000 @@ -363,12 +363,13 @@ (deffoo nnrss-retrieve-groups (groups &optional server) (dolist (group groups) + (setq group (nnrss-decode-group-name group)) (nnrss-possibly-change-group group server) (nnrss-check-group group server)) (with-current-buffer nntp-server-buffer (erase-buffer) (dolist (group groups) - (let ((elem (assoc group nnrss-server-data))) + (let ((elem (assoc (gnus-group-decoded-name group) nnrss-server-data))) (insert (format "%S %s 1 y\n" group (or (cadr elem) 0))))) 'active)) ------------------------------------------------------------ revno: 105721 fixes bug(s): http://debbugs.gnu.org/9139 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2011-09-11 01:52:07 -0400 message: Fix bug #9139 with revisiting non-existent files. src/fileio.c (Finsert_file_contents): If the file cannot be opened, set its "size" to -1. This will set the modtime_size field of the corresponding buffer to -1, which is what verify-visited-file-modtime expects for files that do not exist. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-11 00:41:48 +0000 +++ src/ChangeLog 2011-09-11 05:52:07 +0000 @@ -1,3 +1,11 @@ +2011-09-11 Eli Zaretskii + + * fileio.c (Finsert_file_contents): If the file cannot be opened, + set its "size" to -1. This will set the modtime_size field of + the corresponding buffer to -1, which is what + verify-visited-file-modtime expects for files that do not exist. + (Bug#9139) + 2011-09-11 Paul Eggert * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls === modified file 'src/fileio.c' --- src/fileio.c 2011-09-09 01:06:52 +0000 +++ src/fileio.c 2011-09-11 05:52:07 +0000 @@ -3253,6 +3253,7 @@ if (NILP (visit)) report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); st.st_mtime = -1; + st.st_size = -1; how_much = 0; if (!NILP (Vcoding_system_for_read)) Fset (Qbuffer_file_coding_system, Vcoding_system_for_read); ------------------------------------------------------------ revno: 105720 fixes bug(s): http://debbugs.gnu.org/9029 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 06:28:07 +0200 message: Make `(type graphic)' match `x', `w32' and `ns', like the manual says. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 03:35:02 +0000 +++ lisp/ChangeLog 2011-09-11 04:28:07 +0000 @@ -1,5 +1,8 @@ 2011-09-11 Lars Magne Ingebrigtsen + * faces.el (face-spec-set-match-display): Make `(type graphic)' + match `x', `w32' and `ns', like the manual says (bug#9029). + * subr.el (eval-after-load): Doc string clarification (bug#9125). (process-kill-buffer-query-function): Mention the buffer name in the query. === modified file 'lisp/faces.el' --- lisp/faces.el 2011-08-24 18:01:40 +0000 +++ lisp/faces.el 2011-09-11 04:28:07 +0000 @@ -1445,6 +1445,8 @@ options (cdr conjunct) match (cond ((eq req 'type) (or (memq (window-system frame) options) + (and (memq 'graphic options) + (memq (window-system frame) '(x w32 ns))) ;; FIXME: This should be revisited to use ;; display-graphic-p, provided that the ;; color selection depends on the number ------------------------------------------------------------ revno: 105719 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 05:35:02 +0200 message: (process-kill-buffer-query-function): Mention the buffer name in the query. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 02:56:39 +0000 +++ lisp/ChangeLog 2011-09-11 03:35:02 +0000 @@ -1,6 +1,8 @@ 2011-09-11 Lars Magne Ingebrigtsen * subr.el (eval-after-load): Doc string clarification (bug#9125). + (process-kill-buffer-query-function): Mention the buffer name in + the query. * image-mode.el (image-next-line): The line parameter is mandatory (bug#9258). === modified file 'lisp/subr.el' --- lisp/subr.el 2011-09-11 02:56:39 +0000 +++ lisp/subr.el 2011-09-11 03:35:02 +0000 @@ -1904,7 +1904,9 @@ (or (not process) (not (memq (process-status process) '(run stop open listen))) (not (process-query-on-exit-flag process)) - (yes-or-no-p "Buffer has a running process; kill it? ")))) + (yes-or-no-p + (format "Buffer %S has a running process; kill it? " + (buffer-name (current-buffer))))))) (add-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function) ------------------------------------------------------------ revno: 105718 fixes bug(s): http://debbugs.gnu.org/9125 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 04:56:39 +0200 message: * subr.el (eval-after-load): Doc string clarification diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 02:31:21 +0000 +++ lisp/ChangeLog 2011-09-11 02:56:39 +0000 @@ -1,5 +1,7 @@ 2011-09-11 Lars Magne Ingebrigtsen + * subr.el (eval-after-load): Doc string clarification (bug#9125). + * image-mode.el (image-next-line): The line parameter is mandatory (bug#9258). === modified file 'lisp/subr.el' --- lisp/subr.el 2011-09-11 02:10:15 +0000 +++ lisp/subr.el 2011-09-11 02:56:39 +0000 @@ -1747,7 +1747,7 @@ (put 'eval-after-load 'lisp-indent-function 1) (defun eval-after-load (file form) - "Arrange that, if FILE is ever loaded, FORM will be run at that time. + "Arrange that if FILE is loaded, FORM will be run immediately afterwards. If FILE is already loaded, evaluate FORM right now. If a matching file is loaded again, FORM will be evaluated again. ------------------------------------------------------------ revno: 105717 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 04:31:21 +0200 message: * image-mode.el (image-next-line): The line parameter is mandatory diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 02:29:23 +0000 +++ lisp/ChangeLog 2011-09-11 02:31:21 +0000 @@ -1,5 +1,8 @@ 2011-09-11 Lars Magne Ingebrigtsen + * image-mode.el (image-next-line): The line parameter is mandatory + (bug#9258). + * dired.el (dired-sort-toggle-or-edit): Mention -o and -g, too, which can be useful (bug#9301). === modified file 'lisp/image-mode.el' --- lisp/image-mode.el 2011-07-14 17:05:43 +0000 +++ lisp/image-mode.el 2011-09-11 02:31:21 +0000 @@ -163,7 +163,7 @@ (interactive "p") (image-forward-hscroll (- n))) -(defun image-next-line (&optional n) +(defun image-next-line (n) "Scroll image in current window upward by N lines. Stop if the bottom edge of the image is reached." (interactive "p") ------------------------------------------------------------ revno: 105716 fixes bug(s): http://debbugs.gnu.org/9301 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 04:29:23 +0200 message: * dired.el (dired-sort-toggle-or-edit): Mention -o and -g, too, which can be useful. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 02:14:10 +0000 +++ lisp/ChangeLog 2011-09-11 02:29:23 +0000 @@ -1,5 +1,8 @@ 2011-09-11 Lars Magne Ingebrigtsen + * dired.el (dired-sort-toggle-or-edit): Mention -o and -g, too, + which can be useful (bug#9301). + * textmodes/flyspell.el: Remove obsolete comment (bug#9368). * subr.el (match-string): Mention that the current buffer should === modified file 'lisp/dired.el' --- lisp/dired.el 2011-08-18 11:36:19 +0000 +++ lisp/dired.el 2011-09-11 02:29:23 +0000 @@ -3413,7 +3413,7 @@ (error "Cannot sort this dired buffer")) (if arg (dired-sort-other - (read-string "ls switches (must contain -l): " dired-actual-switches)) + (read-string "ls switches (must contain -l, -o, or -g): " dired-actual-switches)) (dired-sort-toggle))) (defun dired-sort-toggle () ------------------------------------------------------------ revno: 105715 fixes bug(s): http://debbugs.gnu.org/9368 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 04:14:10 +0200 message: * textmodes/flyspell.el: Remove obsolete comment diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 02:10:15 +0000 +++ lisp/ChangeLog 2011-09-11 02:14:10 +0000 @@ -1,5 +1,7 @@ 2011-09-11 Lars Magne Ingebrigtsen + * textmodes/flyspell.el: Remove obsolete comment (bug#9368). + * subr.el (match-string): Mention that the current buffer should be the same as the search was done in (bug#9282). === modified file 'lisp/textmodes/flyspell.el' --- lisp/textmodes/flyspell.el 2011-07-01 18:13:17 +0000 +++ lisp/textmodes/flyspell.el 2011-09-11 02:14:10 +0000 @@ -33,9 +33,6 @@ ;; M-x flyspell-prog-mode. ;; In that mode only text inside comments is checked. ;; -;; Note: consider setting the variable ispell-parser to `tex' to -;; avoid TeX command checking; use `(setq ispell-parser 'tex)'. -;; ;; Some user variables control the behavior of flyspell. They are ;; those defined under the `User variables' comment. ------------------------------------------------------------ revno: 105714 fixes bug(s): http://debbugs.gnu.org/9282 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 04:10:15 +0200 message: Doc string clarification. * subr.el (match-string): Mention that the current buffer should be the same as the search was done in. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-11 01:55:09 +0000 +++ lisp/ChangeLog 2011-09-11 02:10:15 +0000 @@ -1,5 +1,8 @@ 2011-09-11 Lars Magne Ingebrigtsen + * subr.el (match-string): Mention that the current buffer should + be the same as the search was done in (bug#9282). + * facemenu.el: Disable the remove-* commands if the mark isn't active (bug#9162). === modified file 'lisp/subr.el' --- lisp/subr.el 2011-09-05 08:05:01 +0000 +++ lisp/subr.el 2011-09-11 02:10:15 +0000 @@ -3249,7 +3249,9 @@ NUM specifies which parenthesized expression in the last regexp. Value is nil if NUMth pair didn't match, or there were less than NUM pairs. Zero means the entire text matched by the whole regexp or whole string. -STRING should be given if the last search was by `string-match' on STRING." +STRING should be given if the last search was by `string-match' on STRING. +If STRING is nil, the current buffer should be the same buffer +the search/match was performed in." (if (match-beginning num) (if string (substring string (match-beginning num) (match-end num)) @@ -3260,7 +3262,9 @@ NUM specifies which parenthesized expression in the last regexp. Value is nil if NUMth pair didn't match, or there were less than NUM pairs. Zero means the entire text matched by the whole regexp or whole string. -STRING should be given if the last search was by `string-match' on STRING." +STRING should be given if the last search was by `string-match' on STRING. +If STRING is nil, the current buffer should be the same buffer +the search/match was performed in." (if (match-beginning num) (if string (substring-no-properties string (match-beginning num) ------------------------------------------------------------ revno: 105713 fixes bug(s): http://debbugs.gnu.org/9233 author: Juanma Barranquero committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 04:04:07 +0200 message: * processes.texi (Network Servers): Clarify what the process buffer is used for. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-08-30 22:43:43 +0000 +++ doc/lispref/ChangeLog 2011-09-11 02:04:07 +0000 @@ -1,3 +1,8 @@ +2011-09-11 Juanma Barranquero + + * processes.texi (Network Servers): Clarify what the process + buffer is used for (bug#9233). + 2011-08-30 Dani Moncayo (tiny change) * lists.texi (Building Lists): Fix typo. === modified file 'doc/lispref/processes.texi' --- doc/lispref/processes.texi 2011-06-15 17:30:41 +0000 +++ doc/lispref/processes.texi 2011-09-11 02:04:07 +0000 @@ -1981,9 +1981,9 @@ buffer for the purpose. The buffer name is the server's buffer name or process name, concatenated with the client identification string. -The server's process buffer value is never used directly by Emacs, but -it is passed to the log function, which can log connections by -inserting text there. +The server's process buffer value is never used directly, but the log +function can retrieve it and use it to log connections by inserting +text there. @item The communication type and the process filter and sentinel are ------------------------------------------------------------ revno: 105712 fixes bug(s): http://debbugs.gnu.org/9162 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2011-09-11 03:55:09 +0200 message: * facemenu.el: Disable the remove-* commands if the mark isn't active. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-10 21:15:28 +0000 +++ lisp/ChangeLog 2011-09-11 01:55:09 +0000 @@ -1,3 +1,8 @@ +2011-09-11 Lars Magne Ingebrigtsen + + * facemenu.el: Disable the remove-* commands if the mark isn't + active (bug#9162). + 2011-09-10 Chong Yidong * buff-menu.el (Buffer-menu-switch-other-window): Use second arg === modified file 'lisp/facemenu.el' --- lisp/facemenu.el 2011-04-19 13:44:55 +0000 +++ lisp/facemenu.el 2011-09-11 01:55:09 +0000 @@ -241,10 +241,12 @@ (define-key map [df] (cons (purecopy "Display Faces") 'list-faces-display)) (define-key map [dp] (cons (purecopy "Describe Properties") 'describe-text-properties)) - (define-key map [ra] (cons (purecopy "Remove Text Properties") - 'facemenu-remove-all)) - (define-key map [rm] (cons (purecopy "Remove Face Properties") - 'facemenu-remove-face-props)) + (define-key map [ra] (list 'menu-item (purecopy "Remove Text Properties") + 'facemenu-remove-all + :enable 'mark-active)) + (define-key map [rm] (list 'menu-item (purecopy "Remove Face Properties") + 'facemenu-remove-face-props + :enable 'mark-active)) (define-key map [s1] (list (purecopy "--")))) (let ((map facemenu-menu)) (define-key map [in] (cons (purecopy "Indentation") ------------------------------------------------------------ revno: 105711 committer: Paul Eggert branch nick: trunk timestamp: Sat 2011-09-10 17:41:48 -0700 message: * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls here ... * lisp.h: ... from here. push_key_description is no longer defined in keyboard.c, so its declaration should not be in lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE logically belongs with push_key_description. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-10 19:41:33 +0000 +++ src/ChangeLog 2011-09-11 00:41:48 +0000 @@ -1,3 +1,12 @@ +2011-09-11 Paul Eggert + + * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls + here ... + * lisp.h: ... from here. push_key_description is no longer + defined in keyboard.c, so its declaration should not be in + lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE + logically belongs with push_key_description. + 2011-09-10 Paul Eggert * buffer.h: Include instead of . === modified file 'src/keymap.h' --- src/keymap.h 2011-07-29 00:32:09 +0000 +++ src/keymap.h 2011-09-11 00:41:48 +0000 @@ -19,6 +19,16 @@ #ifndef KEYMAP_H #define KEYMAP_H +/* The maximum byte size consumed by push_key_description. + All callers should assure that at least this size of memory is + allocated at the place pointed by the second argument. + + There are 6 modifiers, each consumes 2 chars. + The octal form of a character code consumes + (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head). + We need one more byte for string terminator `\0'. */ +#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1) + #define KEYMAPP(m) (!NILP (get_keymap (m, 0, 0))) extern Lisp_Object Qkeymap, Qmenu_bar; extern Lisp_Object Qremap; @@ -30,6 +40,7 @@ EXFUN (Fcommand_remapping, 3); EXFUN (Fkey_binding, 4); EXFUN (Fkey_description, 2); +extern char *push_key_description (EMACS_INT, char *, int); EXFUN (Fsingle_key_description, 2); EXFUN (Fwhere_is_internal, 5); EXFUN (Fcurrent_active_maps, 2); === modified file 'src/lisp.h' --- src/lisp.h 2011-09-09 01:06:52 +0000 +++ src/lisp.h 2011-09-11 00:41:48 +0000 @@ -1599,16 +1599,6 @@ itself. */ #define CHARACTERBITS 22 -/* The maximum byte size consumed by push_key_description. - All callers should assure that at least this size of memory is - allocated at the place pointed by the second argument. - - There are 6 modifiers, each consumes 2 chars. - The octal form of a character code consumes - (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head). - We need one more byte for string terminator `\0'. */ -#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1) - /* The glyph datatype, used to represent characters on the display. It consists of a char code and a face id. */ @@ -3258,8 +3248,6 @@ extern void init_keyboard (void); extern void syms_of_keyboard (void); extern void keys_of_keyboard (void); -extern char *push_key_description (EMACS_INT, char *, int); - /* Defined in indent.c */ EXFUN (Fvertical_motion, 2); ------------------------------------------------------------ revno: 105710 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2011-09-10 23:30:53 +0000 message: Merge changes made in Gnus trunk. gnus.texi: Remove mentions of `recent', which are now obsolete. (Interactive): Document `quiet'. nnimap.el: Redo the charset handling. Let Gnus encode the names, as it does with all other backends, but decode the names immediately after getting them. gnus-group.el (gnus-group-name-charset): Always return `utf-7' when decoding nnimap groups. gnus.el (gnus-variable-list): Don't save `gnus-format-specs' in the newsrc file. It doesn't seem like an important optimisation any more. nnimap.el (nnimap-transform-headers): Fix regexp to be less prone to overflows. gnus.el (gnus-article-mark-lists): Remove `recent'. (gnus-interactive-exit): Extend to `quiet'. gnus-sum.el (gnus-offer-save-summaries): Use it. gnus-art.el (gnus-treat-hide-citation-maybe): Add more doc to the string. plstore.el (plstore--get-buffer): Silence compiler warnings by renaming function arguments from `this'. gnus-sum.el (gnus-newsgroup-recent): Removed. gnus-spec.el (gnus-lrm-string-p): `bidi-string-mark-left-to-right' has been renamed. (gnus-lrm-string-p): Include RLM and PDF, too. gnus-int.el (gnus-open-server): Make the "denied" message clearer (bug#9225). diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-08-16 07:13:02 +0000 +++ doc/misc/ChangeLog 2011-09-10 23:30:53 +0000 @@ -1,3 +1,8 @@ +2011-09-10 Lars Magne Ingebrigtsen + + * gnus.texi: Remove mentions of `recent', which are now obsolete. + (Interactive): Document `quiet'. + 2011-08-15 Suvayu Ali (tiny change) * org.texi (Images in LaTeX export): rewrite. === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-07-05 22:49:25 +0000 +++ doc/misc/gnus.texi 2011-09-10 23:30:53 +0000 @@ -2983,7 +2983,7 @@ Predicates include @code{tick}, @code{unsend}, @code{undownload}, @code{unread}, @code{dormant}, @code{expire}, @code{reply}, @code{killed}, @code{bookmark}, @code{score}, @code{save}, -@code{cache}, @code{forward}, @code{unseen} and @code{recent}. +@code{cache}, @code{forward}, and @code{unseen}. @end table @@ -6165,18 +6165,9 @@ (@code{gnus-saved-mark}). @item -@vindex gnus-recent-mark -Articles that according to the server haven't been shown to the user -before are marked with a @samp{N} in the second column -(@code{gnus-recent-mark}). Note that not all servers support this -mark, in which case it simply never appears. Compare with -@code{gnus-unseen-mark}. - -@item @vindex gnus-unseen-mark Articles that haven't been seen before in Gnus by the user are marked with a @samp{.} in the second column (@code{gnus-unseen-mark}). -Compare with @code{gnus-recent-mark}. @item @vindex gnus-downloaded-mark @@ -22265,8 +22256,9 @@ @item gnus-interactive-exit @vindex gnus-interactive-exit -Require confirmation before exiting Gnus. This variable is @code{t} by -default. +If non-@code{nil}, require a confirmation when exiting Gnus. If +@code{quiet}, update any active summary buffers automatically without +querying. The default value is @code{t}. @end table @@ -27993,10 +27985,6 @@ built. @item -The new @code{recent} mark @samp{.} indicates newly arrived messages (as -opposed to old but unread messages). - -@item Gnus supports RFC 2369 mailing list headers, and adds a number of related commands in mailing list groups. @xref{Mailing List}. @@ -29572,9 +29560,9 @@ marks (preserving all marks not mentioned). @var{mark} is a list of marks; where each mark is a symbol. Currently used marks are @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed}, -@code{dormant}, @code{save}, @code{download}, @code{unsend}, -@code{forward} and @code{recent}, but your back end should, if -possible, not limit itself to these. +@code{dormant}, @code{save}, @code{download}, @code{unsend}, and +@code{forward}, but your back end should, if possible, not limit +itself to these. Given contradictory actions, the last action in the list should be the effective one. That is, if your action contains a request to add the === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-10 08:26:12 +0000 +++ lisp/gnus/ChangeLog 2011-09-10 23:30:53 +0000 @@ -1,3 +1,42 @@ +2011-09-10 Lars Magne Ingebrigtsen + + * nnimap.el: Redo the charset handling. Let Gnus encode the names, as + it does with all other backends, but decode the names immediately after + getting them. + + * gnus-group.el (gnus-group-name-charset): Always return `utf-7' when + decoding nnimap groups. + + * gnus.el (gnus-variable-list): Don't save `gnus-format-specs' in the + newsrc file. It doesn't seem like an important optimisation any more. + +2011-09-10 Dave Abrahams (tiny change) + + * nnimap.el (nnimap-transform-headers): Fix regexp to be less prone to + overflows. + +2011-09-10 Lars Magne Ingebrigtsen + + * gnus.el (gnus-article-mark-lists): Remove `recent'. + (gnus-interactive-exit): Extend to `quiet'. + + * gnus-sum.el (gnus-offer-save-summaries): Use it. + + * gnus-art.el (gnus-treat-hide-citation-maybe): Add more doc to the + string. + + * plstore.el (plstore--get-buffer): Silence compiler warnings by + renaming function arguments from `this'. + + * gnus-sum.el (gnus-newsgroup-recent): Removed. + + * gnus-spec.el (gnus-lrm-string-p): `bidi-string-mark-left-to-right' + has been renamed. + (gnus-lrm-string-p): Include RLM and PDF, too. + + * gnus-int.el (gnus-open-server): Make the "denied" message clearer + (bug#9225). + 2011-09-10 Eli Zaretskii Add autoload cookies for functions used by sendmail.el. === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2011-09-09 10:18:45 +0000 +++ lisp/gnus/gnus-art.el 2011-09-10 23:30:53 +0000 @@ -1237,9 +1237,12 @@ :type gnus-article-treat-custom) (defcustom gnus-treat-hide-citation-maybe nil - "Hide cited text. + "Hide cited text according to certain conditions. Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." +predicate. See Info node `(gnus)Customizing Articles'. + +See `gnus-cite-hide-percentage' and `gnus-cite-hide-absolute' for +how to control what it hides." :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) === modified file 'lisp/gnus/gnus-ems.el' --- lisp/gnus/gnus-ems.el 2011-08-18 22:12:47 +0000 +++ lisp/gnus/gnus-ems.el 2011-09-10 23:30:53 +0000 @@ -210,8 +210,8 @@ end nil)))))) (defmacro gnus-string-mark-left-to-right (string) - (if (fboundp 'string-mark-left-to-right) - `(string-mark-left-to-right ,string) + (if (fboundp 'bidi-string-mark-left-to-right) + `(bidi-string-mark-left-to-right ,string) string)) (eval-and-compile === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2011-08-30 22:07:52 +0000 +++ lisp/gnus/gnus-group.el 2011-09-10 23:30:53 +0000 @@ -1201,7 +1201,7 @@ (if (eq (car method) 'nnimap) ;; IMAP groups should not be encoded, since they do the encoding ;; in utf7 in the protocol. - nil + 'utf-8 (let ((item (or (assoc method gnus-group-name-charset-method-alist) (and (consp method) (assoc (list (car method) (cadr method)) @@ -4069,7 +4069,7 @@ (gnus-group-update-group group nil t)) (if (eq (gnus-server-status (gnus-find-method-for-group group)) 'denied) - (gnus-error 3 "Server denied access") + (gnus-error 3 "Server previously determined to be down; not retrying") (gnus-error 3 "%s error: %s" group (gnus-status-message group))))) (when beg (goto-char beg)) === modified file 'lisp/gnus/gnus-int.el' --- lisp/gnus/gnus-int.el 2011-07-14 14:19:53 +0000 +++ lisp/gnus/gnus-int.el 2011-09-10 23:30:53 +0000 @@ -255,7 +255,8 @@ ;; If this method was previously denied, we just return nil. (if (eq (nth 1 elem) 'denied) (progn - (gnus-message 1 "Denied server %s" server) + (gnus-message + 1 "Server %s previously determined to be down; not retrying" server) nil) ;; Open the server. (let* ((open-server-function === modified file 'lisp/gnus/gnus-spec.el' --- lisp/gnus/gnus-spec.el 2011-09-04 22:17:09 +0000 +++ lisp/gnus/gnus-spec.el 2011-09-10 23:30:53 +0000 @@ -91,8 +91,10 @@ (header gnus-tmp-from)) (defmacro gnus-lrm-string-p (string) - (if (fboundp 'string-mark-left-to-rigth) - `(eq (aref ,string (1- (length ,string))) 8206) + (if (fboundp 'bidi-string-mark-left-to-right) + ;; LRM, RLM, PDF characters as integers to avoid breaking Emacs + ;; 23. + `(memq (aref ,string (1- (length ,string))) '(8206 8207 8236)) nil)) (defvar gnus-lrm-string (if (ignore-errors (string 8206)) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2011-09-05 22:07:34 +0000 +++ lisp/gnus/gnus-sum.el 2011-09-10 23:30:53 +0000 @@ -1499,9 +1499,6 @@ (defvar gnus-newsgroup-forwarded nil "List of articles that have been forwarded in the current newsgroup.") -(defvar gnus-newsgroup-recent nil - "List of articles that have are recent in the current newsgroup.") - (defvar gnus-newsgroup-expirable nil "Sorted list of articles in the current newsgroup that can be expired.") @@ -1578,7 +1575,6 @@ gnus-newsgroup-saved gnus-newsgroup-replied gnus-newsgroup-forwarded - gnus-newsgroup-recent gnus-newsgroup-expirable gnus-newsgroup-killed gnus-newsgroup-unseen @@ -3743,8 +3739,6 @@ gnus-forwarded-mark) ((memq gnus-tmp-current gnus-newsgroup-saved) gnus-saved-mark) - ((memq gnus-tmp-number gnus-newsgroup-recent) - gnus-recent-mark) ((memq gnus-tmp-number gnus-newsgroup-unseen) gnus-unseen-mark) (t gnus-no-mark))) @@ -5395,8 +5389,6 @@ gnus-forwarded-mark) ((memq number gnus-newsgroup-saved) gnus-saved-mark) - ((memq number gnus-newsgroup-recent) - gnus-recent-mark) ((memq number gnus-newsgroup-unseen) gnus-unseen-mark) (t gnus-no-mark)) @@ -5807,8 +5799,6 @@ (memq article gnus-newsgroup-forwarded)) ((eq type 'seen) (not (memq article gnus-newsgroup-unseen))) - ((eq type 'recent) - (memq article gnus-newsgroup-recent)) (t t)))) (defun gnus-articles-to-read (group &optional read-all) @@ -10985,8 +10975,6 @@ gnus-forwarded-mark) ((memq article gnus-newsgroup-saved) gnus-saved-mark) - ((memq article gnus-newsgroup-recent) - gnus-recent-mark) ((memq article gnus-newsgroup-unseen) gnus-unseen-mark) (t gnus-no-mark)) @@ -12594,12 +12582,16 @@ ;; Go through all these summary buffers and offer to save them. (when buffers (save-excursion - (map-y-or-n-p - "Update summary buffer %s? " - (lambda (buf) - (switch-to-buffer buf) - (gnus-summary-exit)) - buffers))))) + (if (eq gnus-interactive-exit 'quiet) + (dolist (buffer buffers) + (switch-to-buffer buffer) + (gnus-summary-exit)) + (map-y-or-n-p + "Update summary buffer %s? " + (lambda (buf) + (switch-to-buffer buf) + (gnus-summary-exit)) + buffers)))))) (defun gnus-summary-setup-default-charset () "Setup newsgroup default charset." === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2011-09-04 22:17:09 +0000 +++ lisp/gnus/gnus.el 2011-09-10 23:30:53 +0000 @@ -1591,7 +1591,9 @@ :type 'boolean) (defcustom gnus-interactive-exit t - "*If non-nil, require your confirmation when exiting Gnus." + "*If non-nil, require your confirmation when exiting Gnus. +If `quiet', update any active summary buffers automatically +first before exiting." :group 'gnus-exit :type 'boolean) @@ -2623,7 +2625,7 @@ (scored . score) (saved . save) (cached . cache) (downloadable . download) (unsendable . unsend) (forwarded . forward) - (recent . recent) (seen . seen))) + (seen . seen))) (defconst gnus-article-special-mark-lists '((seen range) @@ -2689,8 +2691,7 @@ gnus-newsrc-last-checked-date gnus-newsrc-alist gnus-server-alist gnus-killed-list gnus-zombie-list - gnus-topic-topology gnus-topic-alist - gnus-format-specs) + gnus-topic-topology gnus-topic-alist) "Gnus variables saved in the quick startup file.") (defvar gnus-newsrc-alist nil === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-09-03 22:51:26 +0000 +++ lisp/gnus/nnimap.el 2011-09-10 23:30:53 +0000 @@ -168,6 +168,8 @@ nnmail-extra-headers)))) (deffoo nnimap-retrieve-headers (articles &optional group server fetch-old) + (when group + (setq group (nnimap-decode-gnus-group group))) (with-current-buffer nntp-server-buffer (erase-buffer) (when (nnimap-possibly-change-group group server) @@ -190,7 +192,7 @@ (let (article bytes lines size string) (block nil (while (not (eobp)) - (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)")) + (while (not (looking-at "\\* [0-9]+ FETCH.+?UID \\([0-9]+\\)")) (delete-region (point) (progn (forward-line 1) (point))) (when (eobp) (return))) @@ -523,6 +525,8 @@ nnimap-status-string) (deffoo nnimap-request-article (article &optional group server to-buffer) + (when group + (setq group (nnimap-decode-gnus-group group))) (with-current-buffer nntp-server-buffer (let ((result (nnimap-possibly-change-group group server)) parts structure) @@ -554,6 +558,8 @@ (cons group article))))))) (deffoo nnimap-request-head (article &optional group server to-buffer) + (when group + (setq group (nnimap-decode-gnus-group group))) (when (nnimap-possibly-change-group group server) (with-current-buffer (nnimap-buffer) (when (stringp article) @@ -700,7 +706,11 @@ (incf num))) (nreverse parts))) +(defun nnimap-decode-gnus-group (group) + (decode-coding-string group 'utf-8)) + (deffoo nnimap-request-group (group &optional server dont-check info) + (setq group (nnimap-decode-gnus-group group)) (let ((result (nnimap-possibly-change-group ;; Don't SELECT the group if we're going to select it ;; later, anyway. @@ -750,16 +760,19 @@ t)))) (deffoo nnimap-request-create-group (group &optional server args) + (setq group (nnimap-decode-gnus-group group)) (when (nnimap-possibly-change-group nil server) (with-current-buffer (nnimap-buffer) (car (nnimap-command "CREATE %S" (utf7-encode group t)))))) (deffoo nnimap-request-delete-group (group &optional force server) + (setq group (nnimap-decode-gnus-group group)) (when (nnimap-possibly-change-group nil server) (with-current-buffer (nnimap-buffer) (car (nnimap-command "DELETE %S" (utf7-encode group t)))))) (deffoo nnimap-request-rename-group (group new-name &optional server) + (setq group (nnimap-decode-gnus-group group)) (when (nnimap-possibly-change-group nil server) (with-current-buffer (nnimap-buffer) (nnimap-unselect-group) @@ -774,6 +787,7 @@ (nnimap-command "EXAMINE DOES.NOT.EXIST")) (deffoo nnimap-request-expunge-group (group &optional server) + (setq group (nnimap-decode-gnus-group group)) (when (nnimap-possibly-change-group group server) (with-current-buffer (nnimap-buffer) (car (nnimap-command "EXPUNGE"))))) @@ -801,6 +815,7 @@ (deffoo nnimap-request-move-article (article group server accept-form &optional last internal-move-group) + (setq group (nnimap-decode-gnus-group group)) (with-temp-buffer (mm-disable-multibyte) (when (funcall (if internal-move-group @@ -829,6 +844,7 @@ result))))))) (deffoo nnimap-request-expire-articles (articles group &optional server force) + (setq group (nnimap-decode-gnus-group group)) (cond ((null articles) nil) @@ -956,6 +972,8 @@ "delete this article now")))))) (deffoo nnimap-request-scan (&optional group server) + (when group + (setq group (nnimap-decode-gnus-group group))) (when (and (nnimap-possibly-change-group nil server) nnimap-inbox nnimap-split-methods) @@ -971,6 +989,7 @@ flags)) (deffoo nnimap-request-update-group-status (group status &optional server) + (setq group (nnimap-decode-gnus-group group)) (when (nnimap-possibly-change-group nil server) (let ((command (assoc status @@ -981,6 +1000,7 @@ (nnimap-command "%s %S" (cadr command) (utf7-encode group t))))))) (deffoo nnimap-request-set-mark (group actions &optional server) + (setq group (nnimap-decode-gnus-group group)) (when (nnimap-possibly-change-group group server) (let (sequence) (with-current-buffer (nnimap-buffer) @@ -1005,6 +1025,7 @@ (nnimap-wait-for-response sequence)))))) (deffoo nnimap-request-accept-article (group &optional server last) + (setq group (nnimap-decode-gnus-group group)) (when (nnimap-possibly-change-group nil server) (nnmail-check-syntax) (let ((message-id (message-field-value "message-id")) @@ -1081,6 +1102,7 @@ result)) (deffoo nnimap-request-replace-article (article group buffer) + (setq group (nnimap-decode-gnus-group group)) (let (group-art) (when (and (nnimap-possibly-change-group group nil) ;; Put the article into the group. @@ -1186,7 +1208,8 @@ ;; what and how to request the data. (dolist (info infos) (setq params (gnus-info-params info) - group (gnus-group-real-name (gnus-info-group info)) + group (nnimap-decode-gnus-group + (gnus-group-real-name (gnus-info-group info))) active (cdr (assq 'active params)) uidvalidity (cdr (assq 'uidvalidity params)) modseq (cdr (assq 'modseq params))) @@ -1262,13 +1285,15 @@ (active (gnus-active group))) (when active (insert (format "%S %d %d y\n" - (gnus-group-real-name group) + (decode-coding-string + (gnus-group-real-name group) 'utf-8) (cdr active) (car active))))))))))) (defun nnimap-update-infos (flags infos) (dolist (info infos) - (let* ((group (gnus-group-real-name (gnus-info-group info))) + (let* ((group (nnimap-decode-gnus-group + (gnus-group-real-name (gnus-info-group info)))) (marks (cdr (assoc group flags)))) (when marks (nnimap-update-info info marks))))) @@ -1570,6 +1595,8 @@ (articles &optional limit force-new dependencies)) (deffoo nnimap-request-thread (header &optional group server) + (when group + (setq group (nnimap-decode-gnus-group group))) (if gnus-refer-thread-use-nnir (nnir-search-thread header) (when (nnimap-possibly-change-group group server) === modified file 'lisp/gnus/plstore.el' --- lisp/gnus/plstore.el 2011-07-08 01:29:29 +0000 +++ lisp/gnus/plstore.el 2011-09-10 23:30:53 +0000 @@ -135,38 +135,38 @@ (message "%s...%d%%" handback (if (> total 0) (floor (* (/ current (float total)) 100)) 0)))) -(defun plstore--get-buffer (this) - (aref this 0)) - -(defun plstore--get-alist (this) - (aref this 1)) - -(defun plstore--get-encrypted-data (this) - (aref this 2)) - -(defun plstore--get-secret-alist (this) - (aref this 3)) - -(defun plstore--get-merged-alist (this) - (aref this 4)) - -(defun plstore--set-buffer (this buffer) - (aset this 0 buffer)) - -(defun plstore--set-alist (this plist) - (aset this 1 plist)) - -(defun plstore--set-encrypted-data (this encrypted-data) - (aset this 2 encrypted-data)) - -(defun plstore--set-secret-alist (this secret-alist) - (aset this 3 secret-alist)) - -(defun plstore--set-merged-alist (this merged-alist) - (aset this 4 merged-alist)) - -(defun plstore-get-file (this) - (buffer-file-name (plstore--get-buffer this))) +(defun plstore--get-buffer (arg) + (aref arg 0)) + +(defun plstore--get-alist (arg) + (aref arg 1)) + +(defun plstore--get-encrypted-data (arg) + (aref arg 2)) + +(defun plstore--get-secret-alist (arg) + (aref arg 3)) + +(defun plstore--get-merged-alist (arg) + (aref arg 4)) + +(defun plstore--set-buffer (arg buffer) + (aset arg 0 buffer)) + +(defun plstore--set-alist (arg plist) + (aset arg 1 plist)) + +(defun plstore--set-encrypted-data (arg encrypted-data) + (aset arg 2 encrypted-data)) + +(defun plstore--set-secret-alist (arg secret-alist) + (aset arg 3 secret-alist)) + +(defun plstore--set-merged-alist (arg merged-alist) + (aset arg 4 merged-alist)) + +(defun plstore-get-file (arg) + (buffer-file-name (plstore--get-buffer arg))) (defun plstore--make (&optional buffer alist encrypted-data secret-alist merged-alist) ------------------------------------------------------------ revno: 105709 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-09-10 17:15:28 -0400 message: Fix various uses of display-buffer and pop-to-buffer to avoid using special-display-* and same-window-* variables. * lisp/buff-menu.el (Buffer-menu-switch-other-window): Use second arg of display-buffer. (Buffer-menu-2-window): Use switch-to-buffer-other-window. * lisp/replace.el (occur-mode-goto-occurrence) (occur-mode-display-occurrence) Use second arg of pop-to-buffer and display-buffer. * lisp/window.el (display-buffer-alist): Add *Python*. * lisp/mail/reporter.el (reporter-submit-bug-report): Use second arg of display-buffer. * lisp/mail/sendmail.el (sendmail-user-agent-compose): Don't bind the special-display and same-window variables. (mail-other-window): Use switch-to-buffer-other-window. (mail-other-frame): USe switch-to-buffer-other-frame. * lisp/progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use display-buffer-other-frame. (gdb-display-gdb-buffer): Use pop-to-buffer. * lisp/progmodes/gud.el (gud-goto-info): Use info-other-window. * lisp/progmodes/python.el: Don't set same-window-buffer-names. * lisp/textmodes/bibtex.el (bibtex-search-entry): Use switch-to-buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-10 20:14:02 +0000 +++ lisp/ChangeLog 2011-09-10 21:15:28 +0000 @@ -1,5 +1,35 @@ 2011-09-10 Chong Yidong + * buff-menu.el (Buffer-menu-switch-other-window): Use second arg + of display-buffer. + (Buffer-menu-2-window): Use switch-to-buffer-other-window. + + * replace.el (occur-mode-goto-occurrence) + (occur-mode-display-occurrence) Use second arg of pop-to-buffer + and display-buffer. + + * mail/reporter.el (reporter-submit-bug-report): Use second arg of + display-buffer. + + * mail/sendmail.el (sendmail-user-agent-compose): Don't bind the + special-display and same-window variables. + (mail-other-window): Use switch-to-buffer-other-window. + (mail-other-frame): USe switch-to-buffer-other-frame. + + * progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use + display-buffer-other-frame. + (gdb-display-gdb-buffer): Use pop-to-buffer. + + * progmodes/gud.el (gud-goto-info): Use info-other-window. + + * progmodes/python.el: Don't set same-window-buffer-names. + + * textmodes/bibtex.el (bibtex-search-entry): Use switch-to-buffer. + + * window.el (display-buffer-alist): Add *Python*. + +2011-09-10 Chong Yidong + * window.el (display-buffer-alist): Add entry for buffers previously handled same-window-*. (display-buffer-alist, display-buffer-default-action) === modified file 'lisp/buff-menu.el' --- lisp/buff-menu.el 2011-08-25 10:45:33 +0000 +++ lisp/buff-menu.el 2011-09-10 21:15:28 +0000 @@ -586,22 +586,16 @@ "Make the other window select this line's buffer. The current window remains selected." (interactive) - (let ((pop-up-windows t) - same-window-buffer-names - same-window-regexps) - (display-buffer (Buffer-menu-buffer t)))) + (display-buffer (Buffer-menu-buffer t) t)) (defun Buffer-menu-2-window () "Select this line's buffer, with previous buffer in second window." (interactive) (let ((buff (Buffer-menu-buffer t)) - (menu (current-buffer)) - (pop-up-windows t) - same-window-buffer-names - same-window-regexps) + (menu (current-buffer))) (delete-other-windows) (switch-to-buffer (other-buffer)) - (pop-to-buffer buff) + (switch-to-buffer-other-window buff) (bury-buffer menu))) (defun Buffer-menu-toggle-read-only () === modified file 'lisp/mail/reporter.el' --- lisp/mail/reporter.el 2011-01-25 04:08:28 +0000 +++ lisp/mail/reporter.el 2011-09-10 21:15:28 +0000 @@ -332,12 +332,11 @@ hookvar) ;; do the work (require 'sendmail) + ;; Just in case the original buffer is not visible now, bring it + ;; back somewhere + (display-buffer reporter-eval-buffer) ;; If mailbuf did not get made visible before, make it visible now. - (let (same-window-buffer-names same-window-regexps) - (pop-to-buffer mailbuf) - ;; Just in case the original buffer is not visible now, bring it - ;; back somewhere - (and pop-up-windows (display-buffer reporter-eval-buffer))) + (pop-to-buffer mailbuf) (goto-char (point-min)) (mail-position-on-field "to") (insert address) === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2011-09-10 18:52:37 +0000 +++ lisp/mail/sendmail.el 2011-09-10 21:15:28 +0000 @@ -565,11 +565,7 @@ send-actions return-action &rest ignored) (if switch-function - (let ((special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (funcall switch-function "*mail*"))) + (funcall switch-function "*mail*")) (let ((cc (cdr (assoc-string "cc" other-headers t))) (in-reply-to (cdr (assoc-string "in-reply-to" other-headers t))) (body (cdr (assoc-string "body" other-headers t)))) @@ -1966,24 +1962,14 @@ (defun mail-other-window (&optional noerase to subject in-reply-to cc replybuffer sendactions) "Like `mail' command, but display mail buffer in another window." (interactive "P") - (let ((pop-up-windows t) - (special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (pop-to-buffer "*mail*")) + (switch-to-buffer-other-window "*mail*") (mail noerase to subject in-reply-to cc replybuffer sendactions)) ;;;###autoload (defun mail-other-frame (&optional noerase to subject in-reply-to cc replybuffer sendactions) "Like `mail' command, but display mail buffer in another frame." (interactive "P") - (let ((pop-up-frames t) - (special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (pop-to-buffer "*mail*")) + (switch-to-buffer-other-frame "*mail*") (mail noerase to subject in-reply-to cc replybuffer sendactions)) ;; Do not add anything but external entries on this page. === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2011-09-08 12:12:18 +0000 +++ lisp/progmodes/compile.el 2011-09-10 21:15:28 +0000 @@ -2408,9 +2408,8 @@ ;; also do this while we change buffer (compilation-set-window w msg) compilation-highlight-regexp))) - ;; Ideally, the window-size should be passed to `display-buffer' (via - ;; something like special-display-buffer) so it's only used when - ;; creating a new window. + ;; Ideally, the window-size should be passed to `display-buffer' + ;; so it's only used when creating a new window. (unless pre-existing (compilation-set-window-height w)) (if from-compilation-buffer === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2011-07-05 18:58:33 +0000 +++ lisp/progmodes/gdb-mi.el 2011-09-10 21:15:28 +0000 @@ -3980,18 +3980,12 @@ (defun gdb-frame-gdb-buffer () "Display GUD buffer in a new frame." (interactive) - (let ((special-display-regexps (append special-display-regexps '(".*"))) - (special-display-frame-alist - (remove '(menu-bar-lines) (remove '(tool-bar-lines) - gdb-frame-parameters))) - (same-window-regexps nil)) - (display-buffer gud-comint-buffer))) + (display-buffer-other-frame gud-comint-buffer)) (defun gdb-display-gdb-buffer () "Display GUD buffer." (interactive) - (let ((same-window-regexps nil)) - (select-window (display-buffer gud-comint-buffer nil 0)))) + (pop-to-buffer gud-comint-buffer nil 0)) (defun gdb-set-window-buffer (name &optional ignore-dedicated window) "Set buffer of selected window to NAME and dedicate window. === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2011-09-10 18:52:37 +0000 +++ lisp/progmodes/gud.el 2011-09-10 21:15:28 +0000 @@ -112,20 +112,9 @@ (defun gud-goto-info () "Go to relevant Emacs info node." (interactive) - (let ((same-window-regexps same-window-regexps) - (display-buffer-reuse-frames t)) - (catch 'info-found - (walk-windows - (lambda (window) - (if (eq (window-buffer window) (get-buffer "*info*")) - (progn - (setq same-window-regexps nil) - (throw 'info-found nil)))) - nil 0) - (select-frame (make-frame))) - (if (eq gud-minor-mode 'gdbmi) - (info "(emacs)GDB Graphical Interface") - (info "(emacs)Debuggers")))) + (if (eq gud-minor-mode 'gdbmi) + (info-other-window "(emacs)GDB Graphical Interface") + (info-other-window "(emacs)Debuggers"))) (defun gud-tool-bar-item-visible-no-fringe () (not (or (eq (buffer-local-value 'major-mode (window-buffer)) 'speedbar-mode) === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2011-09-03 18:44:37 +0000 +++ lisp/progmodes/python.el 2011-09-10 21:15:28 +0000 @@ -86,7 +86,6 @@ (add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode)) ;;;###autoload (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) -(add-to-list 'same-window-buffer-names (purecopy "*Python*")) ;;;; Font lock === modified file 'lisp/replace.el' --- lisp/replace.el 2011-07-02 13:53:53 +0000 +++ lisp/replace.el 2011-09-10 21:15:28 +0000 @@ -928,7 +928,7 @@ (defalias 'occur-mode-mouse-goto 'occur-mode-goto-occurrence) (defun occur-mode-goto-occurrence (&optional event) - "Go to the occurrence the current line describes." + "Go to the occurrence on the current line." (interactive (list last-nonmenu-event)) (let ((pos (if (null event) @@ -939,10 +939,8 @@ (with-current-buffer (window-buffer (posn-window (event-end event))) (save-excursion (goto-char (posn-point (event-end event))) - (occur-mode-find-occurrence))))) - same-window-buffer-names - same-window-regexps) - (pop-to-buffer (marker-buffer pos)) + (occur-mode-find-occurrence)))))) + (pop-to-buffer (marker-buffer pos) t) (goto-char pos) (run-hooks 'occur-mode-find-occurrence-hook))) @@ -958,11 +956,8 @@ "Display in another window the occurrence the current line describes." (interactive) (let ((pos (occur-mode-find-occurrence)) - window - ;; Bind these to ensure `display-buffer' puts it in another window. - same-window-buffer-names - same-window-regexps) - (setq window (display-buffer (marker-buffer pos))) + window) + (setq window (display-buffer (marker-buffer pos) t)) ;; This is the way to set point in the proper window. (save-selected-window (select-window window) === modified file 'lisp/textmodes/bibtex.el' --- lisp/textmodes/bibtex.el 2011-09-02 16:38:40 +0000 +++ lisp/textmodes/bibtex.el 2011-09-10 21:15:28 +0000 @@ -4038,10 +4038,8 @@ ;; `bibtex-search-entry' moves point if key found (setq found (bibtex-search-entry key))))) (cond ((and found display) - (let ((same-window-buffer-names - (cons (buffer-name buffer) same-window-buffer-names))) - (pop-to-buffer buffer) - (bibtex-reposition-window))) + (switch-to-buffer buffer) + (bibtex-reposition-window)) (found (set-buffer buffer)) (display (message "Key `%s' not found" key))) found) === modified file 'lisp/window.el' --- lisp/window.el 2011-09-10 19:31:05 +0000 +++ lisp/window.el 2011-09-10 21:15:28 +0000 @@ -4499,8 +4499,9 @@ (current-buffer))) (defvar display-buffer-alist - '(("\\`\\*\\(scheme\\|ielm\\|shell\\|\\(unsent \\)?mail\\|inferior-lisp\ -\\|Customiz.*\\|info\\|rlogin-.*\\|telnet-.*\\|rsh-.*\\|gud-.*\\)\\*\\(<[0-9]+>\\)?" + '(("\\`\\*\\(scheme\\|ielm\\|shell\\|\\(unsent \\)?mail\\|\ +inferior-lisp\\|Python\\|Customiz.*\\|info\\|rlogin-.*\\|\ +telnet-.*\\|rsh-.*\\|gud-.*\\)\\*\\(<[0-9]+>\\)?" . (display-buffer-same-window))) "Alist of conditional actions for `display-buffer'. This is a list of elements (CONDITION . ACTION), where: @@ -4565,7 +4566,7 @@ (put 'display-buffer--other-frame-action 'risky-local-variable t) (defun display-buffer (&optional buffer-or-name action frame) - "Display BUFFER-OR-NAME in some window. + "Display BUFFER-OR-NAME in some window, without selecting it. BUFFER-OR-NAME must be a buffer or the name of an existing buffer. Return the window chosen for displaying BUFFER-OR-NAME, or nil if no such window is found. ------------------------------------------------------------ revno: 105708 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-09-10 16:14:02 -0400 message: Fix info and customize *-other-window commands. * lisp/cus-edit.el (customize-group): New argument. (customize-group-other-window): Use it. (customize-face, customize-face-other-window): Likewise. (custom-buffer-create-other-window): Use pop-to-buffer directly. * lisp/info.el (info-setup): New function. (info-other-window, info): Call it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-10 19:31:05 +0000 +++ lisp/ChangeLog 2011-09-10 20:14:02 +0000 @@ -22,8 +22,16 @@ (display-buffer--maybe-same-window): Renamed from display-buffer-maybe-same-window. - * cus-edit.el: - * info.el: + * info.el: Don't set same-window-regexps. + (info-setup): New function. + (info-other-window, info): Call it. + + * cus-edit.el: Don't set same-window-regexps. + (customize-group): New argument. + (customize-group-other-window): Use it. + (customize-face, customize-face-other-window): Likewise. + (custom-buffer-create-other-window): Use pop-to-buffer directly. + * net/rlogin.el: * net/telnet.el: * progmodes/gud.el: Don't set same-window-regexps. === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2011-09-10 18:52:37 +0000 +++ lisp/cus-edit.el 2011-09-10 20:14:02 +0000 @@ -1101,8 +1101,9 @@ t))) ;;;###autoload -(defun customize-group (&optional group) - "Customize GROUP, which must be a customization group." +(defun customize-group (&optional group other-window) + "Customize GROUP, which must be a customization group. +If OTHER-WINDOW is non-nil, display in another window." (interactive (list (customize-read-group))) (when (stringp group) (if (string-equal "" group) @@ -1111,21 +1112,20 @@ (let ((name (format "*Customize Group: %s*" (custom-unlispify-tag-name group)))) (if (get-buffer name) - (pop-to-buffer name) - (custom-buffer-create - (list (list group 'custom-group)) - name - (concat " for group " - (custom-unlispify-tag-name group)))))) + (pop-to-buffer name other-window) + (funcall (if other-window + 'custom-buffer-create-other-window + 'custom-buffer-create) + (list (list group 'custom-group)) + name + (concat " for group " + (custom-unlispify-tag-name group)))))) ;;;###autoload (defun customize-group-other-window (&optional group) "Customize GROUP, which must be a customization group, in another window." (interactive (list (customize-read-group))) - (let ((pop-up-windows t) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (customize-group group))) + (customize-group group t)) ;;;###autoload (defalias 'customize-variable 'customize-option) @@ -1306,11 +1306,13 @@ (< minor1 minor2))))) ;;;###autoload -(defun customize-face (&optional face) +(defun customize-face (&optional face other-window) "Customize FACE, which should be a face name or nil. If FACE is nil, customize all faces. If FACE is actually a face-alias, customize the face it is aliased to. +If OTHER-WINDOW is non-nil, display in another window. + Interactively, when point is on text which has a face specified, suggest to customize that face, if it's customizable." (interactive (list (read-face-name "Customize face" "all faces" t))) @@ -1318,21 +1320,24 @@ (setq face (face-list))) (if (and (listp face) (null (cdr face))) (setq face (car face))) - (if (listp face) - (custom-buffer-create - (custom-sort-items - (mapcar (lambda (s) (list s 'custom-face)) face) - t nil) - "*Customize Faces*") - ;; If FACE is actually an alias, customize the face it is aliased to. - (if (get face 'face-alias) - (setq face (get face 'face-alias))) - (unless (facep face) - (error "Invalid face %S" face)) - (custom-buffer-create - (list (list face 'custom-face)) - (format "*Customize Face: %s*" - (custom-unlispify-tag-name face))))) + (let ((display-fun (if other-window + 'custom-buffer-create-other-window + 'custom-buffer-create))) + (if (listp face) + (funcall display-fun + (custom-sort-items + (mapcar (lambda (s) (list s 'custom-face)) face) + t nil) + "*Customize Faces*") + ;; If FACE is actually an alias, customize the face it is aliased to. + (if (get face 'face-alias) + (setq face (get face 'face-alias))) + (unless (facep face) + (error "Invalid face %S" face)) + (funcall display-fun + (list (list face 'custom-face)) + (format "*Customize Face: %s*" + (custom-unlispify-tag-name face)))))) ;;;###autoload (defun customize-face-other-window (&optional face) @@ -1342,10 +1347,7 @@ Interactively, when point is on text which has a face specified, suggest to customize that face, if it's customizable." (interactive (list (read-face-name "Customize face" "all faces" t))) - (let ((pop-up-windows t) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (customize-face face))) + (customize-face face t)) (defalias 'customize-customized 'customize-unsaved) @@ -1543,11 +1545,8 @@ SYMBOL is a customization option, and WIDGET is a widget for editing that option." (unless name (setq name "*Customization*")) - (let ((pop-up-windows t) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (pop-to-buffer (custom-get-fresh-buffer name)) - (custom-buffer-create-internal options description))) + (pop-to-buffer (custom-get-fresh-buffer name) t) + (custom-buffer-create-internal options description)) (defcustom custom-reset-button-menu nil "If non-nil, only show a single reset button in customize buffers. === modified file 'lisp/info.el' --- lisp/info.el 2011-09-10 18:52:37 +0000 +++ lisp/info.el 2011-09-10 20:14:02 +0000 @@ -610,8 +610,7 @@ "Like `info' but show the Info buffer in another window." (interactive (if current-prefix-arg (list (read-file-name "Info file name: " nil nil t)))) - (let (same-window-buffer-names same-window-regexps) - (info file-or-node))) + (info-setup file-or-node (pop-to-buffer "*info*" t))) ;;;###autoload (put 'info 'info-file (purecopy "emacs")) ;;;###autoload @@ -641,7 +640,10 @@ (read-file-name "Info file name: " nil nil t)) (if (numberp current-prefix-arg) (format "*info*<%s>" current-prefix-arg)))) - (pop-to-buffer (or buffer "*info*")) + (info-setup file-or-node (pop-to-buffer (or buffer "*info*")))) + +(defun info-setup (file-or-node buffer) + "Display Info node FILE-OR-NODE in BUFFER." (if (and buffer (not (eq major-mode 'Info-mode))) (Info-mode)) (if file-or-node ------------------------------------------------------------ revno: 105707 committer: Paul Eggert branch nick: trunk timestamp: Sat 2011-09-10 12:41:33 -0700 message: * buffer.h: Include instead of . Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386. Problem reported by Herbert J. Skuhra. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-10 18:14:50 +0000 +++ src/ChangeLog 2011-09-10 19:41:33 +0000 @@ -1,3 +1,9 @@ +2011-09-10 Paul Eggert + + * buffer.h: Include instead of . + Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386. + Problem reported by Herbert J. Skuhra. + 2011-09-10 Lars Magne Ingebrigtsen * xml.c (parse_region): Make the parsing work for === modified file 'src/buffer.h' --- src/buffer.h 2011-09-03 05:23:17 +0000 +++ src/buffer.h 2011-09-10 19:41:33 +0000 @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#include /* for time_t */ +#include /* for off_t, time_t */ /* Accessing the parameters of the current buffer. */ ------------------------------------------------------------ revno: 105706 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-09-10 15:31:05 -0400 message: window.el (display-buffer--maybe-same-window): Renamed from display-buffer-maybe-same-window. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-10 18:52:37 +0000 +++ lisp/ChangeLog 2011-09-10 19:31:05 +0000 @@ -19,6 +19,8 @@ (display-buffer-use-some-window): Don't perform any special pop-up-frames handling. (pop-to-buffer): Use window-normalize-buffer-to-switch-to. + (display-buffer--maybe-same-window): Renamed from + display-buffer-maybe-same-window. * cus-edit.el: * info.el: === modified file 'lisp/window.el' --- lisp/window.el 2011-09-10 18:52:37 +0000 +++ lisp/window.el 2011-09-10 19:31:05 +0000 @@ -4515,7 +4515,7 @@ (put 'display-buffer-alist 'risky-local-variable t) (defvar display-buffer-default-action - '((display-buffer-maybe-same-window + '((display-buffer--maybe-same-window display-buffer-reuse-window display-buffer--special display-buffer--maybe-pop-up-frame-or-window @@ -4585,7 +4585,6 @@ Available action functions include: `display-buffer-same-window' - `display-buffer-maybe-same-window' `display-buffer-reuse-window' `display-buffer-pop-up-frame' `display-buffer-pop-up-window' @@ -4668,7 +4667,7 @@ (display-buffer-record-window 'reuse-window (selected-window) buffer) (window--display-buffer-2 buffer (selected-window)))) -(defun display-buffer-maybe-same-window (buffer alist) +(defun display-buffer--maybe-same-window (buffer alist) "Conditionally display BUFFER in the selected window. If `same-window-p' returns non-nil for BUFFER's name, call `display-buffer-same-window' and return its value. Otherwise, ------------------------------------------------------------ revno: 105705 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-09-10 14:52:37 -0400 message: Tweaks to display-buffer default actions; remove same-window-* autoload forms. * lisp/window.el (display-buffer-alist): Add entry for buffers previously handled same-window-*. (display-buffer-alist, display-buffer-default-action) (display-buffer-overriding-action): Mark as risky. (display-buffer-alist): Document action function changes. (display-buffer--same-window-action) (display-buffer--other-frame-action): New variables. (switch-to-buffer, display-buffer-other-frame): Use them. (display-buffer): Rename reuse-frame entry to reusable-frames. (display-buffer-reuse-selected-window): Function deleted. (display-buffer-reuse-window): Handle reusable-frames alist entry. If it's omitted, check pop-up-frames/display-buffer-reuse-frames. (display-buffer-special): New function. (display-buffer--maybe-pop-up-frame-or-window): Rename from display-buffer-reuse-or-pop-window. Split off special-display part into display-buffer-special. (display-buffer-use-some-window): Don't perform any special pop-up-frames handling. (pop-to-buffer): Use window-normalize-buffer-to-switch-to. * lisp/cmuscheme.el: * lisp/ielm.el: * lisp/shell.el: * lisp/mail/sendmail.el: * lisp/progmodes/inf-lisp.el: Don't set same-window-buffer-names. * lisp/cus-edit.el: * lisp/info.el: * lisp/net/rlogin.el: * lisp/net/telnet.el: * lisp/progmodes/gud.el: Don't set same-window-regexps. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-10 11:33:38 +0000 +++ lisp/ChangeLog 2011-09-10 18:52:37 +0000 @@ -1,3 +1,37 @@ +2011-09-10 Chong Yidong + + * window.el (display-buffer-alist): Add entry for buffers + previously handled same-window-*. + (display-buffer-alist, display-buffer-default-action) + (display-buffer-overriding-action): Mark as risky. + (display-buffer-alist): Document action function changes. + (display-buffer--same-window-action) + (display-buffer--other-frame-action): New variables. + (switch-to-buffer, display-buffer-other-frame): Use them. + (display-buffer): Rename reuse-frame entry to reusable-frames. + (display-buffer-reuse-selected-window): Function deleted. + (display-buffer-reuse-window): Handle reusable-frames alist entry. + If it's omitted, check pop-up-frames/display-buffer-reuse-frames. + (display-buffer-special): New function. + (display-buffer--maybe-pop-up-frame-or-window): Rename from + display-buffer-reuse-or-pop-window. Split off special-display + part into display-buffer-special. + (display-buffer-use-some-window): Don't perform any special + pop-up-frames handling. + (pop-to-buffer): Use window-normalize-buffer-to-switch-to. + + * cus-edit.el: + * info.el: + * net/rlogin.el: + * net/telnet.el: + * progmodes/gud.el: Don't set same-window-regexps. + + * cmuscheme.el: + * ielm.el: + * shell.el: + * mail/sendmail.el: + * progmodes/inf-lisp.el: Don't set same-window-buffer-names. + 2011-09-10 Juri Linkov * isearch.el (isearch-edit-string): Remove obsolete mention of === modified file 'lisp/cmuscheme.el' --- lisp/cmuscheme.el 2011-04-19 13:44:55 +0000 +++ lisp/cmuscheme.el 2011-09-10 18:52:37 +0000 @@ -247,7 +247,6 @@ (setq scheme-program-name cmd) (setq scheme-buffer "*scheme*") (pop-to-buffer "*scheme*")) -;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*scheme*")) (defun scheme-start-file (prog) "Return the name of the start file corresponding to PROG. === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2011-08-04 00:58:07 +0000 +++ lisp/cus-edit.el 2011-09-10 18:52:37 +0000 @@ -699,8 +699,6 @@ (const :tag "none" nil)) :group 'custom-menu) -;;;###autoload (add-hook 'same-window-regexps (purecopy "\\`\\*Customiz.*\\*\\'")) - (defun custom-sort-items (items sort-alphabetically order-groups) "Return a sorted copy of ITEMS. ITEMS should be a `custom-group' property. === modified file 'lisp/ielm.el' --- lisp/ielm.el 2011-05-23 17:57:17 +0000 +++ lisp/ielm.el 2011-09-10 18:52:37 +0000 @@ -553,8 +553,6 @@ ;;; User command -;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*ielm*")) - ;;;###autoload (defun ielm nil "Interactively evaluate Emacs Lisp expressions. === modified file 'lisp/info.el' --- lisp/info.el 2011-08-14 05:11:36 +0000 +++ lisp/info.el 2011-09-10 18:52:37 +0000 @@ -613,8 +613,6 @@ (let (same-window-buffer-names same-window-regexps) (info file-or-node))) -;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*info\\*\\(\\|<[0-9]+>\\)")) - ;;;###autoload (put 'info 'info-file (purecopy "emacs")) ;;;###autoload (defun info (&optional file-or-node buffer) === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2011-09-10 08:26:12 +0000 +++ lisp/mail/sendmail.el 2011-09-10 18:52:37 +0000 @@ -1738,9 +1738,6 @@ ;; Put these commands last, to reduce chance of lossage from quitting ;; in middle of loading the file. -;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*mail*")) -;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*unsent mail*")) - ;;;###autoload (defun mail (&optional noerase to subject in-reply-to cc replybuffer actions return-action) === modified file 'lisp/net/rlogin.el' --- lisp/net/rlogin.el 2011-04-08 03:11:31 +0000 +++ lisp/net/rlogin.el 2011-09-10 18:52:37 +0000 @@ -125,8 +125,6 @@ -;;;###autoload (add-hook 'same-window-regexps (purecopy "^\\*rlogin-.*\\*\\(\\|<[0-9]+>\\)")) - (defvar rlogin-history nil) ;;;###autoload === modified file 'lisp/net/telnet.el' --- lisp/net/telnet.el 2011-01-26 08:36:39 +0000 +++ lisp/net/telnet.el 2011-09-10 18:52:37 +0000 @@ -190,8 +190,6 @@ (delete-region comint-last-input-start comint-last-input-end))) -;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*telnet-.*\\*\\(\\|<[0-9]+>\\)")) - ;;;###autoload (defun telnet (host &optional port) "Open a network login connection to host named HOST (a string). @@ -246,8 +244,6 @@ (set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern) (set (make-local-variable 'comint-use-prompt-regexp) t)) -;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)")) - ;;;###autoload (defun rsh (host) "Open a network login connection to host named HOST (a string). === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2011-07-06 02:42:10 +0000 +++ lisp/progmodes/gud.el 2011-09-10 18:52:37 +0000 @@ -2466,10 +2466,6 @@ (set (make-local-variable 'gud-delete-prompt-marker) (make-marker)) (add-hook 'kill-buffer-hook 'gud-kill-buffer-hook nil t)) -;; Cause our buffers to be displayed, by default, -;; in the selected window. -;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*gud-.*\\*\\(\\|<[0-9]+>\\)")) - (defcustom gud-chdir-before-run t "Non-nil if GUD should `cd' to the debugged executable." :group 'gud === modified file 'lisp/progmodes/inf-lisp.el' --- lisp/progmodes/inf-lisp.el 2011-01-26 08:36:39 +0000 +++ lisp/progmodes/inf-lisp.el 2011-09-10 18:52:37 +0000 @@ -298,7 +298,6 @@ (inferior-lisp-mode))) (setq inferior-lisp-buffer "*inferior-lisp*") (pop-to-buffer "*inferior-lisp*")) -;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*inferior-lisp*")) ;;;###autoload (defalias 'run-lisp 'inferior-lisp) === modified file 'lisp/shell.el' --- lisp/shell.el 2011-08-28 05:15:17 +0000 +++ lisp/shell.el 2011-09-10 18:52:37 +0000 @@ -669,9 +669,6 @@ (shell-mode))) buffer) -;; Don't do this when shell.el is loaded, only while dumping. -;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*shell*")) - ;;; Directory tracking ;; ;; This code provides the shell mode input sentinel === modified file 'lisp/window.el' --- lisp/window.el 2011-09-08 15:45:20 +0000 +++ lisp/window.el 2011-09-10 18:52:37 +0000 @@ -4498,53 +4498,44 @@ buffer)) (current-buffer))) -(defvar display-buffer-alist nil +(defvar display-buffer-alist + '(("\\`\\*\\(scheme\\|ielm\\|shell\\|\\(unsent \\)?mail\\|inferior-lisp\ +\\|Customiz.*\\|info\\|rlogin-.*\\|telnet-.*\\|rsh-.*\\|gud-.*\\)\\*\\(<[0-9]+>\\)?" + . (display-buffer-same-window))) "Alist of conditional actions for `display-buffer'. This is a list of elements (CONDITION . ACTION), where: CONDITION is either a regexp matching buffer names, or a function that takes a buffer and returns a boolean. - ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is - either a function or a list of functions. Each such function - should accept 2 arguments: a buffer to display and an alist of - the same form as ALIST. It should return the window used, or - nil if it fails to display the window. See `display-buffer' - for more details. - -Usable action functions include: - `display-buffer-reuse-selected-window' - `display-buffer-same-window' - `display-buffer-maybe-same-window' - `display-buffer-reuse-window' - `display-buffer-pop-up-frame' - `display-buffer-pop-up-window' - `display-buffer-reuse-or-pop-window' - `display-buffer-use-some-window' - -The above functions recognize the following alist entries: - - `inhibit-same-window', if non-nil, prevents the same window - from being used for display. - - `reuse-frame' specifies the frames that can be searched for a - window displaying the buffer. Its values have the same - meaning as the ALL-FRAMES arg to `get-buffer-window-list'.") + ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a + function or a list of functions. Each such function should + accept 2 arguments: a buffer to display and an alist of the + same form as ALIST. See `display-buffer' for details.") +(put 'display-buffer-alist 'risky-local-variable t) (defvar display-buffer-default-action - '((display-buffer-reuse-selected-window - display-buffer-maybe-same-window - display-buffer-reuse-or-pop-window + '((display-buffer-maybe-same-window + display-buffer-reuse-window + display-buffer--special + display-buffer--maybe-pop-up-frame-or-window display-buffer-use-some-window - ;; If all else fails, pop up a new frame regardless of - ;; restrictions. + ;; If all else fails, pop up a new frame. display-buffer-pop-up-frame)) "List of default actions for `display-buffer'. -It should be a cons cell of the form (FUNCTION . ALIST), which -has the same meaning as in `display-buffer-alist'.") +It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a +function or a list of functions. Each function should accept 2 +arguments: a buffer to display and an alist of the same form as +ALIST. See `display-buffer' for details.") +(put 'display-buffer-default-action 'risky-local-variable t) (defvar display-buffer-overriding-action nil "Overriding action to perform to display a buffer. -If non-nil, it should be a cons cell (FUNCTION . ALIST), which -has the same meaning as in `display-buffer-alist'.") +If non-nil, it should be a cons cell (FUNCTION . ALIST), where +FUNCTION is a function or a list of functions. Each function +should accept 2 arguments: a buffer to display and an alist of +the same form as ALIST. See `display-buffer' for details.") +(put 'display-buffer-overriding-action 'risky-local-variable t) (defun display-buffer-assq-regexp (buffer-name alist) "Retrieve ALIST entry corresponding to BUFFER-NAME." @@ -4558,6 +4549,21 @@ (funcall key buffer-name alist))) (throw 'match (cdr entry))))))) +(defvar display-buffer--same-window-action + '(display-buffer-same-window + (inhibit-same-window . nil)) + "A `display-buffer' action for displaying in the same window.") +(put 'display-buffer--same-window-action 'risky-local-variable t) + +(defvar display-buffer--other-frame-action + '((display-buffer-reuse-window + display-buffer--special + display-buffer-pop-up-frame) + (reusable-frames . 0) + (inhibit-same-window . t)) + "A `display-buffer' action for displaying in another frame.") +(put 'display-buffer--other-frame-action 'risky-local-variable t) + (defun display-buffer (&optional buffer-or-name action frame) "Display BUFFER-OR-NAME in some window. BUFFER-OR-NAME must be a buffer or the name of an existing @@ -4570,12 +4576,29 @@ alist. It should either display the buffer and return the window, or return nil if it is unable to display the buffer. -`display-buffer' constructs a list of action functions and an -action alist by combining `display-buffer-overriding-action', -`display-buffer-alist', the ACTION argument, and -`display-buffer-default-action' (in that order). It calls each -action function in turn, passing the combined action alist as the -second argument, until one of the functions returns non-nil. +`display-buffer' builds a function list and an alist from +`display-buffer-overriding-action', `display-buffer-alist', +ACTION, and `display-buffer-default-action' (in that order). +Then it calls each function in the combined function list in +turn, passing the buffer as the first argument and the combined +alist as the second argument, until a function returns non-nil. + +Available action functions include: + `display-buffer-same-window' + `display-buffer-maybe-same-window' + `display-buffer-reuse-window' + `display-buffer-pop-up-frame' + `display-buffer-pop-up-window' + `display-buffer-use-some-window' + +Recognized alist entries include: + + `inhibit-same-window' -- A non-nil value prevents the same + window from being used for display. + + `reusable-frames' -- Value specifies frame(s) to search for a + window that already displays the buffer. + See `display-buffer-reuse-window'. The ACTION argument to `display-buffer' can also have a non-nil and non-list value. This means to display the buffer in a window @@ -4583,14 +4606,10 @@ the selected window. If called interactively with a prefix argument, ACTION is t. -Optional argument FRAME specifies where to look for a window that -already displays the buffer. If nil, check only the selected -frame (actually the last non-minibuffer frame), except if -`display-buffer-reuse-frames' or `pop-up-frames' is non-nil -\(non-nil and not graphic-only on a text-only terminal), in which -case check all visible or iconified frames. Otherwise, FRAME can -be a specific frame, `visible' (all visible frames), 0 (all -frames on the current terminal), or t (all frames)." +Optional argument FRAME, if non-nil, acts like an additional +ALIST entry (reusable-frames . FRAME), specifying the frame(s) to +search for a window that is already displaying the buffer. See +`display-buffer-reuse-window'." (interactive (list (read-buffer "Display buffer: " (other-buffer)) (if current-prefix-arg t))) (let ((buffer (window-normalize-buffer-to-display buffer-or-name)) @@ -4609,7 +4628,7 @@ (cons nil (append (if inhibit-same-window '((inhibit-same-window . t))) (if frame - `((reuse-frame . ,frame)))))) + `((reusable-frames . ,frame)))))) ;; Construct action function list and action alist. (actions (list display-buffer-overriding-action user-action action extra-action @@ -4633,45 +4652,16 @@ This uses the function `display-buffer' as a subroutine; see its documentation for additional customization information." (interactive "BDisplay buffer in other frame: ") - (let ((pop-up-frames t) - same-window-buffer-names same-window-regexps - ;;(old-window (selected-window)) - new-window) - (setq new-window (display-buffer buffer t)) - ;; This may have been here in order to prevent the new frame from hiding - ;; the old frame. But it does more harm than good. - ;; Maybe we should call `raise-window' on the old-frame instead? --Stef - ;;(lower-frame (window-frame new-window)) - - ;; This may have been here in order to make sure the old-frame gets the - ;; focus. But not only can it cause an annoying flicker, with some - ;; window-managers it just makes the window invisible, with no easy - ;; way to recover it. --Stef - ;;(make-frame-invisible (window-frame old-window)) - ;;(make-frame-visible (window-frame old-window)) - )) + (display-buffer buffer display-buffer--other-frame-action t)) ;;; `display-buffer' action functions: -(defun display-buffer-reuse-selected-window (buffer alist) - "Try to display BUFFER in the selected window if it is already there. -If this succeeds, return the selected window. - -This fails if BUFFER is not displayed in the selected window, or -if ALIST has a non-nil `inhibit-same-window' entry. In that -case, return nil." - (when (and (not (cdr (assq 'inhibit-same-window alist))) - (eq buffer (window-buffer))) - (display-buffer-record-window 'reuse-window (selected-window) buffer) - (window--display-buffer-1 (selected-window)))) - (defun display-buffer-same-window (buffer alist) - "Try to display BUFFER in the selected window. -If this succeeds, return the selected window. - -This fails if the selected window is a minibuffer window or is -dedicated to another buffer, or if ALIST has a non-nil -`inhibit-same-window' entry. In that case, return nil." + "Display BUFFER in the selected window. +This fails if ALIST has a non-nil `inhibit-same-window' entry, or +if the selected window is a minibuffer window or is dedicated to +another buffer; in that case, return nil. Otherwise, return the +selected window." (unless (or (cdr (assq 'inhibit-same-window alist)) (window-minibuffer-p) (window-dedicated-p)) @@ -4679,42 +4669,66 @@ (window--display-buffer-2 buffer (selected-window)))) (defun display-buffer-maybe-same-window (buffer alist) - "Try to display BUFFER in the selected window. -This acts like `display-buffer-same-window', except that it also -fails if `same-window-p' returns nil for this buffer." + "Conditionally display BUFFER in the selected window. +If `same-window-p' returns non-nil for BUFFER's name, call +`display-buffer-same-window' and return its value. Otherwise, +return nil." (and (same-window-p (buffer-name buffer)) (display-buffer-same-window buffer alist))) (defun display-buffer-reuse-window (buffer alist) "Return a window that is already displaying BUFFER. -If no usable window is found, return nil. - -If ALIST has a non-nil `inhibit-same-window' entry, the same -window cannot be reused. - -If ALIST contains a `reuse-frame' entry, that determines the -frames to check for a window displaying the buffer. If the entry -is omitted or the value is nil, check only this frame. The value -can also be a specific frame, `visible' (all visible frames), -0 (all frames on the current terminal), or t (all frames)." - (let* ((can-use-selected-window - (not (cdr (assq 'inhibit-same-window alist)))) - (frames (or (cdr (assq 'reuse-frame alist)) - (last-nonminibuffer-frame))) - (window (catch 'found - (dolist (window (get-buffer-window-list - buffer 'nomini frames)) - (when (or can-use-selected-window - (not (eq (selected-window) window))) - (throw 'found window)))))) +Return nil if no usable window is found. + +If ALIST has a non-nil `inhibit-same-window' entry, the selected +window is not eligible for reuse. + +If ALIST contains a `reusable-frames' entry, its value determines +which frames to search for a reusable window: + nil -- the selected frame (actually the last non-minibuffer frame) + A frame -- just that frame + `visible' -- all visible frames + 0 -- all frames on the current terminal + t -- all frames. + +If ALIST contains no `reusable-frames' entry, search just the +selected frame if `display-buffer-reuse-frames' and +`pop-up-frames' are both nil; search all frames on the current +terminal if either of those variables is non-nil." + (let* ((alist-entry (assq 'reusable-frames alist)) + (frames (cond (alist-entry (cdr alist-entry)) + ((if (eq pop-up-frames 'graphic-only) + (display-graphic-p) + pop-up-frames) + 0) + (display-buffer-reuse-frames 0) + (t (last-nonminibuffer-frame)))) + (window (if (and (eq buffer (window-buffer)) + (not (cdr (assq 'inhibit-same-window alist)))) + (selected-window) + (car (delq (selected-window) + (get-buffer-window-list buffer 'nomini + frames)))))) (when window (display-buffer-record-window 'reuse-window window buffer) (window--display-buffer-1 window)))) +(defun display-buffer--special (buffer alist) + "Try to display BUFFER using `special-display-function'. +Call `special-display-p' on BUFFER's name, and if that returns +non-nil, call `special-display-function' on BUFFER." + (and special-display-function + ;; `special-display-p' returns either t or a list of frame + ;; parameters to pass to `special-display-function'. + (let ((pars (special-display-p (buffer-name buffer)))) + (when pars + (funcall special-display-function + buffer (if (listp pars) pars)))))) + (defun display-buffer-pop-up-frame (buffer alist) "Display BUFFER in a new frame. -This works by calling `pop-up-frame-function'. If sucessful, -return the window on the new frame; otherwise return nil." +This works by calling `pop-up-frame-function'. If successful, +return the window used; otherwise return nil." (let ((fun pop-up-frame-function) frame window) (when (and fun @@ -4752,42 +4766,20 @@ (set-window-prev-buffers window nil) window))) -;; This display action function groups together some lower-level ones: -(defun display-buffer-reuse-or-pop-window (buffer alist) - "Display BUFFER in some window other than the selected one. -This attempts to call the following functions (in order): - - `display-buffer-reuse-window', ensuring that it checks all - frames on this terminal if `display-buffer-reuse-frames' or - `pop-up-frames' is non-nil. - - `special-display-function', if it is available. - - `display-buffer-pop-up-frame', if specified by `pop-up-frames'. - - `display-buffer-pop-up-window', if specified by `pop-up-windows'. - -If BUFFER is sucessfully display, return its window; otherwise -return nil." - (let ((use-pop-up-frames (if (eq pop-up-frames 'graphic-only) - (display-graphic-p) - pop-up-frames))) - (or (display-buffer-reuse-window - buffer - ;; If `display-buffer-reuse-frames' or `pop-up-frames' is - ;; non-nil, check all frames on this terminal. - (if (and (null (cdr (assq 'reuse-frame alist))) - (or use-pop-up-frames display-buffer-reuse-frames)) - (cons '(reuse-frame . 0) alist) - alist)) - ;; Try with `special-display-function': - (and special-display-function - ;; `special-display-p' returns either t or a list of frame - ;; parameters to pass to `special-display-function'. - (let ((pars (special-display-p (buffer-name buffer)))) - (when pars - (funcall special-display-function - buffer (if (listp pars) pars))))) - (and use-pop-up-frames - (display-buffer-pop-up-frame buffer alist)) - (and pop-up-windows - (display-buffer-pop-up-window buffer alist))))) +(defun display-buffer--maybe-pop-up-frame-or-window (buffer alist) + "Try displaying BUFFER based on `pop-up-frames' or `pop-up-windows'. + +If `pop-up-frames' is non-nil (and not `graphic-only' on a +text-only terminal), try with `display-buffer-pop-up-frame'. + +If that cannot be done, and `pop-up-windows' is non-nil, try +again with `display-buffer-pop-up-window'." + (or (and (if (eq pop-up-frames 'graphic-only) + (display-graphic-p) + pop-up-frames) + (display-buffer-pop-up-frame buffer alist)) + (and pop-up-windows + (display-buffer-pop-up-window buffer alist)))) (defun display-buffer-use-some-window (buffer alist) "Display BUFFER in an existing window. @@ -4803,10 +4795,7 @@ (selected-window))) (frame (or (window--frame-usable-p (selected-frame)) (window--frame-usable-p (last-nonminibuffer-frame)))) - (use-pop-up-frames (if (eq pop-up-frames 'graphic-only) - (display-graphic-p) - pop-up-frames)) - window popped-up-frame) + window) (unwind-protect (setq window ;; Reuse an existing window. @@ -4820,17 +4809,12 @@ (unless (and not-this-window (eq window (selected-window))) window)) - (get-largest-window 0) - (and use-pop-up-frames - (prog1 - (frame-selected-window (funcall pop-up-frame-function)) - (setq popped-up-frame t))))) + (get-largest-window 0))) (when (window-live-p window-to-undedicate) ;; Restore dedicated status of selected window. (set-window-dedicated-p window-to-undedicate nil))) (when window - (display-buffer-record-window - (if popped-up-frame 'pop-up-frame 'reuse-window) window buffer) + (display-buffer-record-window 'reuse-window window buffer) (window--even-window-heights window) (window--display-buffer-2 buffer window)))) @@ -4857,13 +4841,11 @@ at the front of the list of recently selected ones." (interactive (list (read-buffer "Pop to buffer: " (other-buffer)) (if current-prefix-arg t))) - (setq buffer (window-normalize-buffer-to-display - ;; BUFFER nil means another buffer. - (or buffer (other-buffer)))) + (setq buffer (window-normalize-buffer-to-switch-to buffer)) (set-buffer buffer) (let* ((old-window (selected-window)) (old-frame (selected-frame)) - (window (display-buffer (current-buffer) action)) + (window (display-buffer buffer action)) (frame (window-frame window))) (if (eq frame old-frame) ;; Make sure new window is selected (Bug#8615), (Bug#6954). @@ -4937,18 +4919,7 @@ (list (read-buffer-to-switch "Switch to buffer: ") nil nil)) (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name))) (if (null force-same-window) - (cond - ((eq buffer (window-buffer)) - (unless norecord - (select-window (selected-window))) - (set-buffer buffer)) - ((or (window-minibuffer-p) (window-dedicated-p)) - (pop-to-buffer buffer)) - (t - (set-window-buffer nil buffer) - (unless norecord - (select-window (selected-window))) - (set-buffer buffer))) + (pop-to-buffer buffer display-buffer--same-window-action norecord) (cond ;; Don't call set-window-buffer if it's not needed since it ;; might signal an error (e.g. if the window is dedicated). @@ -4984,10 +4955,8 @@ documentation for additional customization information." (interactive (list (read-buffer-to-switch "Switch to buffer in other window: "))) - (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) - (pop-up-windows t) - same-window-buffer-names same-window-regexps) - (pop-to-buffer buffer t norecord))) + (let ((pop-up-windows t)) + (pop-to-buffer buffer-or-name t norecord))) (defun switch-to-buffer-other-frame (buffer-or-name &optional norecord) "Switch to buffer BUFFER-OR-NAME in another frame. @@ -5010,10 +4979,7 @@ documentation for additional customization information." (interactive (list (read-buffer-to-switch "Switch to buffer in other frame: "))) - (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) - (pop-up-frames t) - same-window-buffer-names same-window-regexps) - (pop-to-buffer buffer t norecord))) + (pop-to-buffer buffer-or-name display-buffer--other-frame-action norecord)) (defun set-window-text-height (window height) "Set the height in lines of the text display area of WINDOW to HEIGHT. ------------------------------------------------------------ revno: 105704 fixes bug(s): http://debbugs.gnu.org/9144 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sat 2011-09-10 20:14:50 +0200 message: * xml.c (parse_region): Make the parsing work for non-comment-starting XML files again. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-10 18:13:24 +0000 +++ src/ChangeLog 2011-09-10 18:14:50 +0000 @@ -1,3 +1,8 @@ +2011-09-10 Lars Magne Ingebrigtsen + + * xml.c (parse_region): Make the parsing work for + non-comment-starting XML files again (bug#9144). + 2011-09-10 Andreas Schwab * image.c (gif_load): Fix calculation of bottom and right corner. === modified file 'src/xml.c' --- src/xml.c 2011-09-03 21:59:25 +0000 +++ src/xml.c 2011-09-10 18:14:50 +0000 @@ -124,6 +124,8 @@ if (doc != NULL) { + /* If the document is just comments, then this should get us the + nodes anyway. */ xmlNode *n = doc->children->next; Lisp_Object r = Qnil; @@ -134,9 +136,13 @@ n = n->next; } - if (NILP (result)) - result = r; - else + if (NILP (result)) { + /* The document isn't just comments, so get the tree the + proper way. */ + xmlNode *node = xmlDocGetRootElement (doc); + if (node != NULL) + result = make_dom (node); + } else result = Fcons (intern ("top"), Fcons (Qnil, Fnreverse (Fcons (r, result)))); ------------------------------------------------------------ revno: 105703 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2011-09-10 20:13:24 +0200 message: * src/image.c (gif_load): Fix calculation of bottom and right corner. (Bug#9468) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-10 15:23:25 +0000 +++ src/ChangeLog 2011-09-10 18:13:24 +0000 @@ -1,3 +1,8 @@ +2011-09-10 Andreas Schwab + + * image.c (gif_load): Fix calculation of bottom and right corner. + (Bug#9468) + 2011-09-10 Eli Zaretskii * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish === modified file 'src/image.c' --- src/image.c 2011-09-09 01:06:52 +0000 +++ src/image.c 2011-09-10 18:13:24 +0000 @@ -7229,8 +7229,10 @@ img->corners[TOP_CORNER] = gif->SavedImages[0].ImageDesc.Top; img->corners[LEFT_CORNER] = gif->SavedImages[0].ImageDesc.Left; - img->corners[BOT_CORNER] = img->corners[TOP_CORNER] + height; - img->corners[RIGHT_CORNER] = img->corners[LEFT_CORNER] + width; + img->corners[BOT_CORNER] + = img->corners[TOP_CORNER] + gif->SavedImages[0].ImageDesc.Height; + img->corners[RIGHT_CORNER] + = img->corners[LEFT_CORNER] + gif->SavedImages[0].ImageDesc.Width; if (!check_image_size (f, width, height)) { ------------------------------------------------------------ revno: 105702 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-09-10 18:23:25 +0300 message: Prevent sluggish bidi redisplay in small windows. src/xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish redisplay in small windows. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-09-09 08:32:43 +0000 +++ src/ChangeLog 2011-09-10 15:23:25 +0000 @@ -1,3 +1,8 @@ +2011-09-10 Eli Zaretskii + + * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish + redisplay in small windows. + 2011-09-09 Eli Zaretskii * frame.c (x_report_frame_params): Cast to avoid compiler warnings. === modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-09 01:06:52 +0000 +++ src/xdisp.c 2011-09-10 15:23:25 +0000 @@ -3132,9 +3132,9 @@ } /* How many characters forward to search for a display property or - display string. Enough for a screenful of 100 lines x 50 - characters in a line. */ -#define MAX_DISP_SCAN 5000 + display string. Searching too far forward makes the bidi display + sluggish, especially in small windows. */ +#define MAX_DISP_SCAN 250 /* Return the character position of a display string at or after position specified by POSITION. If no display string exists at or ------------------------------------------------------------ revno: 105701 fixes bug(s): http://debbugs.gnu.org/9466 committer: Juri Linkov branch nick: trunk timestamp: Sat 2011-09-10 14:33:38 +0300 message: Fix docstrings in lisp/isearch.el. * lisp/isearch.el (isearch-edit-string): Remove obsolete mention of `C-w' (`isearch-yank-word-or-char') from docstring. (isearch-query-replace): Fix typo in docstring. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-10 11:28:19 +0000 +++ lisp/ChangeLog 2011-09-10 11:33:38 +0000 @@ -1,5 +1,11 @@ 2011-09-10 Juri Linkov + * isearch.el (isearch-edit-string): Remove obsolete mention of + `C-w' (`isearch-yank-word-or-char') from docstring. + (isearch-query-replace): Fix typo in docstring (bug#9466). + +2011-09-10 Juri Linkov + * paren.el (show-paren-function): Don't show escaped parens. Let-bind `unescaped' to `t' when paren is not escaped. (Bug#9461) === modified file 'lisp/isearch.el' --- lisp/isearch.el 2011-09-06 01:01:46 +0000 +++ lisp/isearch.el 2011-09-10 11:33:38 +0000 @@ -1087,9 +1087,7 @@ \\[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. -\\ -If first char entered is \\[isearch-yank-word-or-char], then do word search instead." +\\[isearch-complete-edit] to complete the search string using the search ring." ;; This code is very hairy for several reasons, explained in the code. ;; Mainly, isearch-mode must be terminated while editing and then restarted. @@ -1381,8 +1379,8 @@ "Start `query-replace' with string to replace from last search string. The arg DELIMITED (prefix arg if interactive), if non-nil, means replace only matches surrounded by word boundaries. Note that using the prefix arg -is possible only when `isearch-allow-scroll' is non-nil, and it don't -always provides the correct matches for `query-replace', so the preferred +is possible only when `isearch-allow-scroll' is non-nil, and it doesn't +always provide the correct matches for `query-replace', so the preferred way to run word replacements from Isearch is `M-s w ... M-%'." (interactive (list current-prefix-arg)) ------------------------------------------------------------ revno: 105700 fixes bug(s): http://debbugs.gnu.org/9461 committer: Juri Linkov branch nick: trunk timestamp: Sat 2011-09-10 14:28:19 +0300 message: * lisp/paren.el (show-paren-function): Don't show escaped parens. Let-bind `unescaped' to `t' when paren is not escaped. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-10 08:26:12 +0000 +++ lisp/ChangeLog 2011-09-10 11:28:19 +0000 @@ -1,3 +1,8 @@ +2011-09-10 Juri Linkov + + * paren.el (show-paren-function): Don't show escaped parens. + Let-bind `unescaped' to `t' when paren is not escaped. (Bug#9461) + 2011-09-10 Eli Zaretskii * mail/sendmail.el (mml-to-mime, mml-attach-file) === modified file 'lisp/paren.el' --- lisp/paren.el 2011-01-25 04:08:28 +0000 +++ lisp/paren.el 2011-09-10 11:28:19 +0000 @@ -135,13 +135,23 @@ ;; and show it until input arrives. (defun show-paren-function () (if show-paren-mode - (let ((oldpos (point)) - (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1) - ((eq (syntax-class (syntax-after (point))) 4) 1))) - pos mismatch face) + (let* ((oldpos (point)) + (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1) + ((eq (syntax-class (syntax-after (point))) 4) 1))) + (unescaped + (when dir + ;; Verify an even number of quoting characters precede the paren. + ;; Follow the same logic as in `blink-matching-open'. + (= (if (= dir -1) 1 0) + (logand 1 (- (point) + (save-excursion + (if (= dir -1) (forward-char -1)) + (skip-syntax-backward "/\\") + (point))))))) + pos mismatch face) ;; ;; Find the other end of the sexp. - (when dir + (when unescaped (save-excursion (save-restriction ;; Determine the range within which to look for a match. ------------------------------------------------------------ revno: 105699 [merge] committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-09-10 11:26:12 +0300 message: Add to sendmail.el a new command mail-add-attachment. etc/NEWS: Document the new command and the alias for mail-insert-file. lisp/mail/sendmail.el (mml-to-mime, mml-attach-file) (mm-default-file-encoding): Remove autoload forms, they are replaced with autoload cookies in mml.el and mm-encode.el. (mail-add-attachment): New command. (mail-mode-map): Add a menu-bar item for mail-add-attachment. (mail-mode): Mention mail-insert-file and mail-add-attachment in the doc string. (mml-to-mime, mml-attach-file, mm-default-file-encoding): Declare. lisp/gnus/mm-encode.el (mm-default-file-encoding): Add autoload cookie. lisp/gnus/mml.el (mml-to-mime, mml-attach-file): Add autoload cookies. doc/emacs/sending.texi (Mail Misc): Document mail-add-attachment. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-09-04 16:53:44 +0000 +++ doc/emacs/ChangeLog 2011-09-10 08:26:12 +0000 @@ -1,3 +1,7 @@ +2011-09-10 Eli Zaretskii + + * sending.texi (Mail Misc): Document mail-add-attachment. + 2011-09-04 Eli Zaretskii * basic.texi (Inserting Text): Add index entries. (Bug#9433) === modified file 'doc/emacs/sending.texi' --- doc/emacs/sending.texi 2011-08-25 16:30:46 +0000 +++ doc/emacs/sending.texi 2011-09-10 08:26:12 +0000 @@ -556,8 +556,8 @@ @cindex Multipurpose Internet Mail Extensions You can @dfn{attach} a file to an outgoing message by typing @kbd{C-c C-a} (@code{mml-attach-file}) in the mail buffer. Attaching -is done using the MIME (Multipurpose Internet Mail Extensions) -standard. +is done using the Multipurpose Internet Mail Extensions +(@acronym{MIME}) standard. The @code{mml-attach-file} command prompts for the name of the file, and for the attachment's @dfn{content type}, @dfn{description}, and @@ -570,6 +570,13 @@ or @samp{attachment}, which means the link will be separate from the body. +@findex mail-add-attachment + The @code{mml-attach-file} command is specific to Message mode; in +Mail mode use @kbd{mail-add-attachment} instead. It will prompt only +for the name of the file, and will determine the content type and the +disposition automatically. If you want to include some description of +the attached file, type that in the message body. + The actual contents of the attached file are not inserted into the mail buffer. Instead, some placeholder text is inserted into the mail buffer, like this: === modified file 'etc/NEWS' --- etc/NEWS 2011-08-30 15:24:07 +0000 +++ etc/NEWS 2011-09-10 08:26:12 +0000 @@ -156,6 +156,15 @@ in your ~/.authinfo file instead. +*** sendmail changes ++++ +You can now add MIME attachments to outgoing messages with the new +command `mail-add-attachment'. + +--- +The command `mail-attach-file' was renamed to `mail-insert-file'; the +old name is now an obsolete alias to the new name. + ** Emacs server and client changes +++ *** New option `server-port' specifies the port on which the Emacs === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-10 03:02:06 +0000 +++ lisp/ChangeLog 2011-09-10 08:26:12 +0000 @@ -1,3 +1,14 @@ +2011-09-10 Eli Zaretskii + + * mail/sendmail.el (mml-to-mime, mml-attach-file) + (mm-default-file-encoding): Remove autoload forms, they are + replaced with autoload cookies in mml.el and mm-encode.el. + (mail-add-attachment): New command. + (mail-mode-map): Add a menu-bar item for mail-add-attachment. + (mail-mode): Mention mail-insert-file and mail-add-attachment in + the doc string. + (mml-to-mime, mml-attach-file, mm-default-file-encoding): Declare. + 2011-09-10 Reuben Thomas * simple.el (count-words-region): Use buffer if there's no region. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-09 10:18:45 +0000 +++ lisp/gnus/ChangeLog 2011-09-10 08:26:12 +0000 @@ -1,3 +1,10 @@ +2011-09-10 Eli Zaretskii + + Add autoload cookies for functions used by sendmail.el. + * mm-encode.el (mm-default-file-encoding): Add autoload cookie. + + * mml.el (mml-to-mime, mml-attach-file): Add autoload cookies. + 2011-09-09 Katsumi Yamaoka * gnus-art.el (article-date-ut): Work properly even when there are === modified file 'lisp/gnus/mm-encode.el' --- lisp/gnus/mm-encode.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/mm-encode.el 2011-09-10 08:26:12 +0000 @@ -97,6 +97,7 @@ (insert "Content-Type: multipart/mixed; boundary=\"" boundary "\"\n") boundary)) +;;;###autoload (defun mm-default-file-encoding (file) "Return a default encoding for FILE." (if (not (string-match "\\.[^.]+$" file)) === modified file 'lisp/gnus/mml.el' --- lisp/gnus/mml.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/mml.el 2011-09-10 08:26:12 +0000 @@ -897,6 +897,7 @@ (autoload 'message-encode-message-body "message") (declare-function message-narrow-to-headers-or-head "message" ()) +;;;###autoload (defun mml-to-mime () "Translate the current buffer from MML to MIME." ;; `message-encode-message-body' will insert an encoded Content-Description @@ -1294,6 +1295,7 @@ :version "22.1" ;; Gnus 5.10.9 :group 'message) +;;;###autoload (defun mml-attach-file (file &optional type description disposition) "Attach a file to the outgoing MIME message. The file is not inserted or encoded until you send the message with === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2011-09-09 08:59:51 +0000 +++ lisp/mail/sendmail.el 2011-09-10 08:26:12 +0000 @@ -31,9 +31,6 @@ (require 'rfc2047) -(autoload 'mml-to-mime "mml" - "Translate the current buffer from MML to MIME.") - (defgroup sendmail nil "Mail sending commands for Emacs." :prefix "mail-" @@ -310,6 +307,9 @@ (define-key map [menu-bar mail] (cons "Mail" (make-sparse-keymap "Mail"))) + (define-key map [menu-bar mail attachment] + '("Attach File" . mail-add-attachment)) + (define-key map [menu-bar mail fill] '("Fill Citation" . mail-fill-yanked-message)) @@ -700,6 +700,8 @@ \\[mail-signature] mail-signature (insert `mail-signature-file' file). \\[mail-yank-original] mail-yank-original (insert current message, in Rmail). \\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked). +\\[mail-insert-file] insert a text file into the message. +\\[mail-add-attachment] attach to the message a file as binary attachment. Turning on Mail mode runs the normal hooks `text-mode-hook' and `mail-mode-hook' (in that order)." (make-local-variable 'mail-reply-action) @@ -868,6 +870,7 @@ :type '(repeat string) :group 'sendmail) +(declare-function mml-to-mime "mml" ()) (defun mail-send () "Send the message in the current buffer. @@ -1697,7 +1700,7 @@ (split-line mail-yank-prefix)) -(defun mail-attach-file (&optional file) +(defun mail-insert-file (&optional file) "Insert a file at the end of the buffer, with separator lines around it." (interactive "fAttach file: ") (save-excursion @@ -1716,6 +1719,21 @@ (insert-file-contents file) (or (bolp) (newline)) (goto-char start)))) + +(define-obsolete-function-alias 'mail-attach-file 'mail-insert-file "24.1") + +(declare-function mml-attach-file "mml" + (file &optional type description disposition)) +(declare-function mm-default-file-encoding "mm-encode" (file)) + +(defun mail-add-attachment (file) + "Add FILE as a MIME attachment to the end of the mail message being composed." + (interactive "fAttach file: ") + (mml-attach-file file + (or (mm-default-file-encoding file) + "application/octet-stream") nil) + (setq mail-encode-mml t)) + ;; Put these commands last, to reduce chance of lossage from quitting ;; in middle of loading the file. ------------------------------------------------------------ revno: 105698 author: Reuben Thomas committer: Stefan Monnier branch nick: trunk timestamp: Fri 2011-09-09 23:02:06 -0400 message: * lisp/simple.el (count-words-region): Use buffer if there's no region. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-09 15:49:00 +0000 +++ lisp/ChangeLog 2011-09-10 03:02:06 +0000 @@ -1,3 +1,7 @@ +2011-09-10 Reuben Thomas + + * simple.el (count-words-region): Use buffer if there's no region. + 2011-09-09 Juri Linkov * wdired.el (wdired-change-to-wdired-mode): Set buffer-local === modified file 'lisp/simple.el' --- lisp/simple.el 2011-09-09 08:59:51 +0000 +++ lisp/simple.el 2011-09-10 03:02:06 +0000 @@ -938,9 +938,10 @@ (forward-line (1- line))))) (defun count-words-region (start end) - "Print the number of words in the region. -When called interactively, the word count is printed in echo area." - (interactive "r") + "Count the number of words in the active region. +If the region is not active, counts the number of words in the buffer." + (interactive (if (use-region-p) (list (region-beginning) (region-end)) + (list (point-min) (point-max)))) (let ((count 0)) (save-excursion (save-restriction @@ -948,8 +949,10 @@ (goto-char (point-min)) (while (forward-word 1) (setq count (1+ count))))) - (if (called-interactively-p 'interactive) - (message "Region has %d words" count)) + (when (called-interactively-p 'interactive) + (message "%s has %d words" + (if (use-region-p) "Region" "Buffer") + count)) count)) (defun count-lines-region (start end) @@ -983,12 +986,12 @@ (if (eq selective-display t) (save-match-data (let ((done 0)) - (while (re-search-forward "[\n\C-m]" nil t 40) - (setq done (+ 40 done))) - (while (re-search-forward "[\n\C-m]" nil t 1) - (setq done (+ 1 done))) - (goto-char (point-max)) - (if (and (/= start end) + (while (re-search-forward "[\n\C-m]" nil t 40) + (setq done (+ 40 done))) + (while (re-search-forward "[\n\C-m]" nil t 1) + (setq done (+ 1 done))) + (goto-char (point-max)) + (if (and (/= start end) (not (bolp))) (1+ done) done))) ------------------------------------------------------------ revno: 105697 fixes bug(s): http://debbugs.gnu.org/6362 committer: Juri Linkov branch nick: trunk timestamp: Fri 2011-09-09 18:49:00 +0300 message: Add `wdired-isearch-filter-read-only' to lisp/wdired.el. * lisp/wdired.el (wdired-change-to-wdired-mode): Set buffer-local `isearch-filter-predicate' to `wdired-isearch-filter-read-only'. (wdired-isearch-filter-read-only): New function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-09-09 09:52:26 +0000 +++ lisp/ChangeLog 2011-09-09 15:49:00 +0000 @@ -1,3 +1,9 @@ +2011-09-09 Juri Linkov + + * wdired.el (wdired-change-to-wdired-mode): Set buffer-local + `isearch-filter-predicate' to `wdired-isearch-filter-read-only'. + (wdired-isearch-filter-read-only): New function. (Bug#6362) + 2011-09-09 Alan Mackenzie * progmodes/cc-mode.el (awk-mode): Prevent `define-derived-mode' === modified file 'lisp/wdired.el' --- lisp/wdired.el 2011-05-09 17:47:01 +0000 +++ lisp/wdired.el 2011-09-09 15:49:00 +0000 @@ -216,6 +216,8 @@ (buffer-substring (point-min) (point-max))) (set (make-local-variable 'wdired-old-point) (point)) (set (make-local-variable 'query-replace-skip-read-only) t) + (set (make-local-variable 'isearch-filter-predicate) + 'wdired-isearch-filter-read-only) (use-local-map wdired-mode-map) (force-mode-line-update) (setq buffer-read-only nil) @@ -241,6 +243,11 @@ "Press \\[wdired-finish-edit] when finished \ or \\[wdired-abort-changes] to abort changes"))) +(defun wdired-isearch-filter-read-only (beg end) + "Skip matches that have a read-only property." + (and (isearch-filter-visible beg end) + (not (text-property-not-all (min beg end) (max beg end) + 'read-only nil)))) ;; Protect the buffer so only the filenames can be changed, and put ;; properties so filenames (old and new) can be easily found. ------------------------------------------------------------ revno: 105696 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2011-09-09 10:18:45 +0000 message: gnus-art.el (article-date-ut): Work properly even when there are things like Date header in the body; work for forwarded parts. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-09-05 22:07:34 +0000 +++ lisp/gnus/ChangeLog 2011-09-09 10:18:45 +0000 @@ -1,3 +1,8 @@ +2011-09-09 Katsumi Yamaoka + + * gnus-art.el (article-date-ut): Work properly even when there are + things like Date header in the body; work for forwarded parts. + 2011-09-05 Andrew Cohen * gnus-sum.el (gnus-summary-exit): Ensure we kill the proper === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2011-09-04 22:17:09 +0000 +++ lisp/gnus/gnus-art.el 2011-09-09 10:18:45 +0000 @@ -3429,32 +3429,43 @@ (visible-date (mail-fetch-field "Date")) pos date bface eface) (save-excursion - (save-restriction - (goto-char (point-min)) - (when (re-search-forward "^Date:" nil t) - (setq bface (get-text-property (point-at-bol) 'face) - eface (get-text-property (1- (point-at-eol)) 'face))) - (goto-char (point-min)) - ;; Delete any old Date headers. - (if date-position - (progn - (goto-char date-position) - (setq date (get-text-property (point) 'original-date)) - (delete-region (point) - (progn - (gnus-article-forward-header) - (point))) + (goto-char (point-min)) + (when (re-search-forward "^Date:" nil t) + (setq bface (get-text-property (point-at-bol) 'face) + eface (get-text-property (1- (point-at-eol)) 'face))) + ;; Delete any old Date headers. + (if date-position + (progn + (goto-char date-position) + (setq date (get-text-property (point) 'original-date)) + (delete-region (point) + (progn + (gnus-article-forward-header) + (point))) + (article-transform-date date type bface eface)) + (save-restriction + (widen) + (goto-char (point-min)) + (while (or (get-text-property (setq pos (point)) 'original-date) + (and (setq pos (next-single-property-change + (point) 'original-date)) + (goto-char pos))) + (narrow-to-region pos (if (search-forward "\n\n" nil t) + (1+ (match-beginning 0)) + (point-max))) + (goto-char (point-min)) + (while (re-search-forward "^Date:" nil t) + (setq date (get-text-property (match-beginning 0) 'original-date)) + (delete-region (point-at-bol) (progn + (gnus-article-forward-header) + (point)))) + (when (and (not date) + visible-date) + (setq date visible-date)) + (when date (article-transform-date date type bface eface)) - (while (re-search-forward "^Date:" nil t) - (setq date (get-text-property (match-beginning 0) 'original-date)) - (delete-region (point-at-bol) (progn - (gnus-article-forward-header) - (point)))) - (when (and (not date) - visible-date) - (setq date visible-date)) - (when date - (article-transform-date date type bface eface))))))) + (goto-char (point-max)) + (widen))))))) (defun article-transform-date (date type bface eface) (dolist (this-type (cond ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.