summaryrefslogtreecommitdiff
path: root/lisp/buff-menu.el
diff options
context:
space:
mode:
authorLennart Borgman <lennart.borgman@gmail.com>2011-01-08 17:15:51 -0500
committerChong Yidong <cyd@stupidchicken.com>2011-01-08 17:15:51 -0500
commit320912fb3d938746b4a74750f366c6e698e91a34 (patch)
treec5a41085e30f9df6096ec2bba414e26ac88495e4 /lisp/buff-menu.el
parentc40b51e0ff77adfbe27150de0e154bd0015a4ec5 (diff)
downloademacs-320912fb3d938746b4a74750f366c6e698e91a34.tar.gz
Fix permanancy of BUFFER-LIST arg to list-buffers-noselect (Bug#7749).
* buff-menu.el (Buffer-menu-buffer-list): New var. (Buffer-menu-revert-function, list-buffers-noselect): Use it, so a restricted buffer list is not lost on revert (Bug#7749).
Diffstat (limited to 'lisp/buff-menu.el')
-rw-r--r--lisp/buff-menu.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 44e494e98a6..19cc01c5144 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -111,9 +111,15 @@ A nil value means sort by visited order (the default).")
This variable determines whether reverting the buffer lists only
file buffers. It affects both manual reverting and reverting by
Auto Revert Mode.")
-
(make-variable-buffer-local 'Buffer-menu-files-only)
+(defvar Buffer-menu--buffers nil
+ "If non-nil, list of buffers shown in the current buffer-menu.
+This variable determines whether reverting the buffer lists only
+this buffers. It affects both manual reverting and reverting by
+Auto Revert Mode.")
+(make-variable-buffer-local 'Buffer-menu--buffers)
+
(defvar Info-current-file) ;; from info.el
(defvar Info-current-node) ;; from info.el
@@ -281,7 +287,7 @@ Letters do not insert themselves; instead, they are commands.
;; interactively current buffer is correctly identified with a `.'
;; by `list-buffers-noselect'.
(with-current-buffer (window-buffer)
- (list-buffers-noselect Buffer-menu-files-only))
+ (list-buffers-noselect Buffer-menu-files-only Buffer-menu--buffers))
(if oline
(while (setq prop (next-single-property-change prop 'buffer))
(when (eq (get-text-property prop 'buffer) oline)
@@ -920,6 +926,7 @@ For more information, see the function `buffer-menu'."
(and desired-point
(goto-char desired-point))
(setq Buffer-menu-files-only files-only)
+ (setq Buffer-menu--buffers buffer-list)
(set-buffer-modified-p nil)
(current-buffer))))