Mercurial > emacs
diff lisp/buff-menu.el @ 112248:6335f5f3cb72
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).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 08 Jan 2011 17:15:51 -0500 |
parents | 376148b31b5e |
children |
line wrap: on
line diff
--- a/lisp/buff-menu.el Sat Jan 08 17:01:13 2011 -0500 +++ b/lisp/buff-menu.el Sat Jan 08 17:15:51 2011 -0500 @@ -111,8 +111,14 @@ 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) -(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 @@ ;; 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 @@ (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))))