summaryrefslogtreecommitdiff
path: root/lisp/buff-menu.el
diff options
context:
space:
mode:
authorLuc Teirlinck <teirllm@auburn.edu>2005-11-27 23:55:30 +0000
committerLuc Teirlinck <teirllm@auburn.edu>2005-11-27 23:55:30 +0000
commit63de21602df3ac75ba3f2399e7547db1a68b790f (patch)
tree8df4145af43867f7888b631a58f60c498fd4cb20 /lisp/buff-menu.el
parentfe0e0a47a5c5fc401ecb58099971168781dace2a (diff)
downloademacs-63de21602df3ac75ba3f2399e7547db1a68b790f.tar.gz
(Buffer-menu-revert-function): Make the selected window's buffer the
current buffer around the call to `list-buffers-noselect'. This is necessary to mark that buffer with a `.' in the Buffer Menu when called from Lisp, for instance by Auto Revert Mode.
Diffstat (limited to 'lisp/buff-menu.el')
-rw-r--r--lisp/buff-menu.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index e48aa9e34b4..bb4bab7dcce 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -210,7 +210,12 @@ Letters do not insert themselves; instead, they are commands.
(prop (point-min))
;; do not make undo records for the reversion.
(buffer-undo-list t))
- (list-buffers-noselect Buffer-menu-files-only)
+ ;; We can be called by Auto Revert Mode with the "*Buffer Menu*"
+ ;; temporarily the current buffer. Make sure that the
+ ;; interactively current buffer is correctly identified with a `.'
+ ;; by `list-buffers-noselect'.
+ (with-current-buffer (window-buffer)
+ (list-buffers-noselect Buffer-menu-files-only))
(if oline
(while (setq prop (next-single-property-change prop 'buffer))
(when (eq (get-text-property prop 'buffer) oline)