From 4ee88440781304fc7003d51e363c3e3a5cc2e8fd Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 1 Nov 2011 17:21:41 +0100 Subject: [PATCH 1/8] Remove unused variable temp-buffer-show-specifiers. * window.c (temp_output_buffer_show): Don't use Vtemp_buffer_show_specifiers. (Vtemp_buffer_show_specifiers): Remove unused variable. * help.el (with-help-window): Don't reference temp-buffer-show-specifiers in doc-string. --- lisp/ChangeLog | 5 +++++ lisp/help.el | 5 +---- src/ChangeLog | 6 ++++++ src/window.c | 15 +-------------- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 97ae0232d55..7be6e030593 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-11-01 Martin Rudalics + + * help.el (with-help-window): Don't reference + temp-buffer-show-specifiers in doc-string. + 2011-10-31 Andreas Schwab * subr.el (keymap--menu-item-with-binding): Ignore item if not a diff --git a/lisp/help.el b/lisp/help.el index bc3d863f357..506889c210e 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1125,10 +1125,7 @@ HELP-WINDOW is the window used for displaying the help buffer." (defmacro with-help-window (buffer-name &rest body) "Display buffer with name BUFFER-NAME in a help window evaluating BODY. Select help window if the actual value of the user option -`help-window-select' says so. Return last value in BODY. - -You can specify where and how to show the buffer by binding the -variable `temp-buffer-show-specifiers' to an appropriate value." +`help-window-select' says so. Return last value in BODY." (declare (indent 1) (debug t)) `(progn ;; Make `help-window-point-marker' point nowhere. The only place diff --git a/src/ChangeLog b/src/ChangeLog index 0bb16514b58..37635555a0f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-11-01 Martin Rudalics + + * window.c (temp_output_buffer_show): Don't use + Vtemp_buffer_show_specifiers. + (Vtemp_buffer_show_specifiers): Remove unused variable. + 2011-10-30 Eli Zaretskii * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented diff --git a/src/window.c b/src/window.c index 38f16c91f34..422073b1bd3 100644 --- a/src/window.c +++ b/src/window.c @@ -3185,10 +3185,7 @@ temp_output_buffer_show (register Lisp_Object buf) call1 (Vtemp_buffer_show_function, buf); else { - window = display_buffer (buf, Vtemp_buffer_show_specifiers, Qnil); - /* Reset Vtemp_buffer_show_specifiers immediately so it won't - affect subsequent calls. */ - Vtemp_buffer_show_specifiers = Qnil; + window = display_buffer (buf, Qnil, Qnil); if (!EQ (XWINDOW (window)->frame, selected_frame)) Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); @@ -6460,16 +6457,6 @@ If this function is used, then it must do the entire job of showing the buffer; `temp-buffer-show-hook' is not run unless this function runs it. */); Vtemp_buffer_show_function = Qnil; - DEFVAR_LISP ("temp-buffer-show-specifiers", Vtemp_buffer_show_specifiers, - doc: /* Buffer display specifiers used by `with-output-to-temp-buffer'. -These specifiers are passed by `with-output-to-temp-buffer' as second -argument to `display-buffer'. Applications should only let-bind this -around a call to `with-output-to-temp-buffer'. - -For a description of buffer display specifiers see the variable -`display-buffer-alist'. */); - Vtemp_buffer_show_specifiers = Qnil; - DEFVAR_LISP ("minibuffer-scroll-window", Vminibuf_scroll_window, doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */); Vminibuf_scroll_window = Qnil; From bc17a887d1df07f5a75287ff7d551d548e10f387 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 1 Nov 2011 20:57:03 +0200 Subject: [PATCH 2/8] Fix mouse highlight in continued lines on a TTY. src/xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. Don't stop backward scan on the continuation glyph, even though its CHARPOS is positive. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 37635555a0f..d27a8625407 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-11-01 Eli Zaretskii + + * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. + Don't stop backward scan on the continuation glyph, even though + its CHARPOS is positive. + 2011-11-01 Martin Rudalics * window.c (temp_output_buffer_show): Don't use diff --git a/src/xdisp.c b/src/xdisp.c index 33c5fc0d230..99d0d69d834 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -25875,10 +25875,10 @@ mouse_face_from_buffer_pos (Lisp_Object window, r2 = next; } /* The rest of the display engine assumes that mouse_face_beg_row is - either above below mouse_face_end_row or identical to it. But - with bidi-reordered continued lines, the row for START_CHARPOS - could be below the row for END_CHARPOS. If so, swap the rows and - store them in correct order. */ + either above mouse_face_end_row or identical to it. But with + bidi-reordered continued lines, the row for START_CHARPOS could + be below the row for END_CHARPOS. If so, swap the rows and store + them in correct order. */ if (r1->y > r2->y) { struct glyph_row *tem = r2; @@ -26030,8 +26030,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, row, and also blanks and stretch glyphs inserted by extend_face_to_end_of_line. */ while (end > glyph - && INTEGERP ((end - 1)->object) - && (end - 1)->charpos <= 0) + && INTEGERP ((end - 1)->object)) --end; /* Scan the rest of the glyph row from the end, looking for the first glyph that comes from BEFORE_STRING, AFTER_STRING, or @@ -26077,8 +26076,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, x = r2->x; end++; while (end < glyph - && INTEGERP (end->object) - && end->charpos <= 0) + && INTEGERP (end->object)) { x += end->pixel_width; ++end; From 26b46e515c1695a73930255dd79cca6d0eb84321 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 1 Nov 2011 21:19:07 +0200 Subject: [PATCH 3/8] Rename locals to match their nature. src/xdisp.c (mouse_face_from_buffer_pos, note_mouse_highlight): Rename cover_string to disp_string. --- src/ChangeLog | 2 ++ src/xdisp.c | 36 ++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d27a8625407..f1ba519d92a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. Don't stop backward scan on the continuation glyph, even though its CHARPOS is positive. + (mouse_face_from_buffer_pos, note_mouse_highlight): Rename + cover_string to disp_string. 2011-11-01 Martin Rudalics diff --git a/src/xdisp.c b/src/xdisp.c index 99d0d69d834..97687f8975b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -25808,7 +25808,7 @@ rows_from_pos_range (struct window *w, for the overlay or run of text properties specifying the mouse face. BEFORE_STRING and AFTER_STRING, if non-nil, are a before-string and after-string that must also be highlighted. - COVER_STRING, if non-nil, is a display string that may cover some + DISP_STRING, if non-nil, is a display string that may cover some or all of the highlighted text. */ static void @@ -25819,7 +25819,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, EMACS_INT end_charpos, Lisp_Object before_string, Lisp_Object after_string, - Lisp_Object cover_string) + Lisp_Object disp_string) { struct window *w = XWINDOW (window); struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); @@ -25828,7 +25828,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, EMACS_INT ignore, pos; int x; - xassert (NILP (cover_string) || STRINGP (cover_string)); + xassert (NILP (disp_string) || STRINGP (disp_string)); xassert (NILP (before_string) || STRINGP (before_string)); xassert (NILP (after_string) || STRINGP (after_string)); @@ -25838,7 +25838,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); /* If the before-string or display-string contains newlines, rows_from_pos_range skips to its last row. Move back. */ - if (!NILP (before_string) || !NILP (cover_string)) + if (!NILP (before_string) || !NILP (disp_string)) { struct glyph_row *prev; while ((prev = r1 - 1, prev >= first) @@ -25850,7 +25850,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, while (--glyph >= beg && INTEGERP (glyph->object)); if (glyph < beg || !(EQ (glyph->object, before_string) - || EQ (glyph->object, cover_string))) + || EQ (glyph->object, disp_string))) break; r1 = prev; } @@ -25893,7 +25893,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, hlinfo->mouse_face_end_row = MATRIX_ROW_VPOS (r2, w->current_matrix); /* For a bidi-reordered row, the positions of BEFORE_STRING, - AFTER_STRING, COVER_STRING, START_CHARPOS, and END_CHARPOS + AFTER_STRING, DISP_STRING, START_CHARPOS, and END_CHARPOS could be anywhere in the row and in any order. The strategy below is to find the leftmost and the rightmost glyph that belongs to either of these 3 strings, or whose position is @@ -25919,11 +25919,11 @@ mouse_face_from_buffer_pos (Lisp_Object window, x += glyph->pixel_width; /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, - or COVER_STRING, and the first glyph from buffer whose + or DISP_STRING, and the first glyph from buffer whose position is between START_CHARPOS and END_CHARPOS. */ for (; glyph < end && !INTEGERP (glyph->object) - && !EQ (glyph->object, cover_string) + && !EQ (glyph->object, disp_string) && !(BUFFERP (glyph->object) && (glyph->charpos >= start_charpos && glyph->charpos < end_charpos)); @@ -25970,11 +25970,11 @@ mouse_face_from_buffer_pos (Lisp_Object window, ; /* Scan the glyph row, looking for BEFORE_STRING, AFTER_STRING, - or COVER_STRING, and the first glyph from buffer whose + or DISP_STRING, and the first glyph from buffer whose position is between START_CHARPOS and END_CHARPOS. */ for (; glyph > end && !INTEGERP (glyph->object) - && !EQ (glyph->object, cover_string) + && !EQ (glyph->object, disp_string) && !(BUFFERP (glyph->object) && (glyph->charpos >= start_charpos && glyph->charpos < end_charpos)); @@ -26034,12 +26034,12 @@ mouse_face_from_buffer_pos (Lisp_Object window, --end; /* Scan the rest of the glyph row from the end, looking for the first glyph that comes from BEFORE_STRING, AFTER_STRING, or - COVER_STRING, or whose position is between START_CHARPOS + DISP_STRING, or whose position is between START_CHARPOS and END_CHARPOS */ for (--end; end > glyph && !INTEGERP (end->object) - && !EQ (end->object, cover_string) + && !EQ (end->object, disp_string) && !(BUFFERP (end->object) && (end->charpos >= start_charpos && end->charpos < end_charpos)); @@ -26083,12 +26083,12 @@ mouse_face_from_buffer_pos (Lisp_Object window, } /* Scan the rest of the glyph row from the end, looking for the first glyph that comes from BEFORE_STRING, AFTER_STRING, or - COVER_STRING, or whose position is between START_CHARPOS + DISP_STRING, or whose position is between START_CHARPOS and END_CHARPOS */ for ( ; end < glyph && !INTEGERP (end->object) - && !EQ (end->object, cover_string) + && !EQ (end->object, disp_string) && !(BUFFERP (end->object) && (end->charpos >= start_charpos && end->charpos < end_charpos)); @@ -27083,7 +27083,7 @@ note_mouse_highlight (struct frame *f, int x, int y) /* The mouse-highlighting, if any, comes from an overlay or text property in the buffer. */ Lisp_Object buffer IF_LINT (= Qnil); - Lisp_Object cover_string IF_LINT (= Qnil); + Lisp_Object disp_string IF_LINT (= Qnil); if (STRINGP (object)) { @@ -27097,13 +27097,13 @@ note_mouse_highlight (struct frame *f, int x, int y) mouse_face = get_char_property_and_overlay (make_number (pos), Qmouse_face, w->buffer, &overlay); buffer = w->buffer; - cover_string = object; + disp_string = object; } } else { buffer = object; - cover_string = Qnil; + disp_string = Qnil; } if (!NILP (mouse_face)) @@ -27155,7 +27155,7 @@ note_mouse_highlight (struct frame *f, int x, int y) XFASTINT (before), XFASTINT (after), before_string, after_string, - cover_string); + disp_string); cursor = No_Cursor; } } From 00b77525cb0a1b4029c18a0b3179812265eb3dc3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 1 Nov 2011 15:22:57 -0400 Subject: [PATCH 4/8] ChangeLog fixes. --- doc/misc/ChangeLog | 5 ++--- lisp/ChangeLog | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index ddad0b45106..029406e2d30 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -10,9 +10,8 @@ "Macros with ;". (Macros with ;): New page. - * progmodes/cc-mode.texi (Movement Commands): Document - `c-defun-tactic'. Document the new handling of nested scopes for - movement by defuns. + * cc-mode.texi (Movement Commands): Document `c-defun-tactic'. + Document the new handling of nested scopes for movement by defuns. 2011-10-23 Michael Albinus diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7be6e030593..ad381e67cf8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -297,7 +297,7 @@ Fix bug #9560, sporadic wrong indentation; improve instrumentation of c-parse-state. - * cc-engine.el (c-append-lower-brace-pair-to-state-cache): + * progmodes/cc-engine.el (c-append-lower-brace-pair-to-state-cache): correct faulty logical expression. (c-parse-state-state, c-record-parse-state-state): (c-replay-parse-state-state): New defvar/defuns. From ebe06da995f8f7b9b8e502c123ad4e8677e34dec Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 2 Nov 2011 02:58:59 +0100 Subject: [PATCH 5/8] Fix bug#9935 * lisp/vc/vc-bzr.el: Accept status with more than 9 shelves. Reported by Colin D Bennett . --- lisp/ChangeLog | 6 ++++++ lisp/vc/vc-bzr.el | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ad381e67cf8..a577dc1f382 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-11-02 Juanma Barranquero + + * vc/vc-bzr.el (vc-bzr-state, vc-bzr-after-dir-status): + Accept status with more than 9 shelves. (Bug#9935) + Reported by Colin D Bennett . + 2011-11-01 Martin Rudalics * help.el (with-help-window): Don't reference diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index cc28db689e9..f6b6a56f31c 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -444,7 +444,7 @@ If any error occurred in running `bzr status', then return nil." (let ((warnings (cdr result))) (when warnings ;; bzr 2.3.0 returns info about shelves, which is not really a warning - (when (string-match "[1-9]+ shel\\(f\\|ves\\) exists?\\..*?\n" warnings) + (when (string-match "[0-9]+ shel\\(f\\|ves\\) exists?\\..*?\n" warnings) (setq warnings (replace-match "" nil nil warnings))) (unless (string= warnings "") (message "Warnings in `bzr' output: %s" warnings)))) @@ -891,7 +891,7 @@ stream. Standard error output is discarded." (goto-char (point-min)) (while (not (eobp)) ;; Bzr 2.3.0 added this if there are shelves. (Bug#8170) - (unless (looking-at "[1-9]+ shel\\(f\\|ves\\) exists?\\.") + (unless (looking-at "[0-9]+ shel\\(f\\|ves\\) exists?\\.") (setq status-str (buffer-substring-no-properties (point) (+ (point) 3))) (setq translated (cdr (assoc status-str translation))) From db22a3c27b078148c26a9f50afca5454a68d37d1 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 2 Nov 2011 03:05:53 +0100 Subject: [PATCH 6/8] Fix typos. --- lisp/ChangeLog | 11 +++++------ lisp/vc/vc-dir.el | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a577dc1f382..4591b9b9281 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -25,8 +25,8 @@ * net/newst-treeview.el: Remove "Time-stamp". (newsticker--group-manage-orphan-feeds): Do not call newsticker--treeview-tree-update. - (newsticker-treeview-update, newsticker-treeview): Call - newsticker--treeview-tree-update if necessary. + (newsticker-treeview-update, newsticker-treeview): + Call newsticker--treeview-tree-update if necessary. 2011-10-30 Martin Rudalics @@ -39,8 +39,7 @@ (split-window, balance-windows-1) (shrink-window-if-larger-than-buffer): * calendar/calendar.el (calendar-generate-window): - * help.el (resize-temp-buffer-window): Adjust callers - accordingly. + * help.el (resize-temp-buffer-window): Adjust callers accordingly. 2011-10-30 Stefan Monnier @@ -115,7 +114,7 @@ 2011-10-28 Alan Mackenzie - * progmodes/cc-defs.el (c-version). -> 5.32.2. + * progmodes/cc-defs.el (c-version): -> 5.32.2. 2011-10-28 Alan Mackenzie @@ -345,7 +344,7 @@ 2011-10-20 Glenn Morris - * vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781) + * vc/vc.el (vc-next-action): Handle removed directories. (Bug#9781) 2011-10-20 Christoph Scholtes diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index ed16ee9f6f8..82eb8783a74 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -992,8 +992,8 @@ specific headers." (let ((def-dir default-directory) (backend vc-dir-backend)) (vc-set-mode-line-busy-indicator) - ;; Call the `dir-status-file' backend function. - ;; `dir-status-file' is supposed to be asynchronous. + ;; Call the `dir-status-files' backend function. + ;; `dir-status-files' is supposed to be asynchronous. ;; It should compute the results, and then call the function ;; passed as an argument in order to update the vc-dir buffer ;; with the results. From b7351677d76c88a96ae80f93773a96ff22d29994 Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Wed, 2 Nov 2011 07:28:14 +0000 Subject: [PATCH 7/8] Rename `gnus-bound-and-true-dumber-p' to `gnus-bound-and-true-p'. --- lisp/gnus/ChangeLog | 7 +++++++ lisp/gnus/gnus-util.el | 11 ++--------- lisp/gnus/nnir.el | 2 +- lisp/gnus/nnmairix.el | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a208ccefd4c..860ccf45206 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,10 @@ +2011-11-01 Teodor Zlatanov + + * gnus-util.el (gnus-bound-and-true-p): Remove. + (gnus-bound-and-true-dumber-p): Rename to `gnus-bound-and-true-p'. + * nnir.el: Use it. + * nnmairix.el: Use it. + 2011-10-31 Teodor Zlatanov * gnus-util.el (gnus-bound-and-true-dumber-p): Define new, slower, dumb diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 71ed50591ad..f811c9664af 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1986,15 +1986,8 @@ definitions to shadow the loaded ones for use in file byte-compilation." (gnus-macroexpand-all expanded environment))) form)))) -(eval-when-compile - ;; This is unnecessary in the compiled version as it is a macro. - (if (fboundp 'bound-and-true-p) - (defalias 'gnus-bound-and-true-p 'bound-and-true-p) - (defmacro gnus-bound-and-true-p (var) - "Return the value of symbol VAR if it is bound, else nil." - `(and (boundp (quote ,var)) ,var)))) - -(defun gnus-bound-and-true-dumber-p (sym) +;; simple check, can be a macro but this way, although slow, it's really clear +(defun gnus-bound-and-true-p (sym) (and (boundp sym) (symbol-value sym))) (provide 'gnus-util) diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 7087f8dba96..88fd4fe1ff6 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -1739,7 +1739,7 @@ environment unless `not-global' is non-nil." (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) (setq gnus-summary-line-format (or nnir-summary-line-format gnus-summary-line-format)) - (when (gnus-bound-and-true-dumber-p 'gnus-registry-enabled) + (when (gnus-bound-and-true-p 'gnus-registry-enabled) (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t) diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el index 0e58af73666..66ed90be823 100644 --- a/lisp/gnus/nnmairix.el +++ b/lisp/gnus/nnmairix.el @@ -1635,7 +1635,7 @@ search in raw mode." (defun nnmairix-determine-original-group-from-registry (mid) "Try to determinale original group for message-id MID from the registry." - (when (gnus-bound-and-true-dumber-p 'gnus-registry-enabled) + (when (gnus-bound-and-true-p 'gnus-registry-enabled) (unless (string-match "^<" mid) (set mid (concat "<" mid))) (unless (string-match ">$" mid) From 1885e5b80a94e5653dd604fb0b7e579d6fe64c3e Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 2 Nov 2011 10:39:18 +0100 Subject: [PATCH 8/8] In quit-window call unrecord-window-buffer later. (Bug#9937) * window.el (quit-window): Call unrecord-window-buffer after showing another buffer in the window. (Bug#9937) (bury-buffer): Call switch-to-prev-buffer with second argument 'bury. --- lisp/ChangeLog | 7 +++++++ lisp/window.el | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4591b9b9281..a009352e46e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-11-02 Martin Rudalics + + * window.el (quit-window): Call unrecord-window-buffer after + showing another buffer in the window. (Bug#9937) + (bury-buffer): Call switch-to-prev-buffer with second argument + 'bury. + 2011-11-02 Juanma Barranquero * vc/vc-bzr.el (vc-bzr-state, vc-bzr-after-dir-status): diff --git a/lisp/window.el b/lisp/window.el index d254248c2c7..d93658a2cef 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2852,7 +2852,7 @@ displayed there." (t ;; Switch to another buffer in window. (set-window-dedicated-p nil nil) - (switch-to-prev-buffer nil 'kill))) + (switch-to-prev-buffer nil 'bury))) ;; Always return nil. nil)) @@ -2985,7 +2985,6 @@ one. If non-nil, reset `quit-restore' parameter to nil." (setq resize (with-current-buffer buffer (and temp-buffer-resize-mode (/= (nth 3 quad) (window-total-size window))))) - (unrecord-window-buffer window buffer) (set-window-dedicated-p window nil) (when resize ;; Try to resize WINDOW to its old height but don't signal an @@ -2993,9 +2992,12 @@ one. If non-nil, reset `quit-restore' parameter to nil." (condition-case nil (window-resize window (- (nth 3 quad) (window-total-size window))) (error nil))) - ;; Restore WINDOW's previous buffer, window start and point. + ;; Restore WINDOW's previous buffer, start and point position. (set-window-buffer-start-and-point window (nth 0 quad) (nth 1 quad) (nth 2 quad)) + ;; Unrecord WINDOW's buffer here (Bug#9937) to make sure it's not + ;; re-recorded by `set-window-buffer'. + (unrecord-window-buffer window buffer) ;; Reset the quit-restore parameter. (set-window-parameter window 'quit-restore nil) ;; Select old window.