Commit 63de2160 authored by Luc Teirlinck's avatar Luc Teirlinck

(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.
parent fe0e0a47
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment