# HG changeset patch # User Luc Teirlinck # Date 1133135730 0 # Node ID 82157c2afd445c94a96a58867041710985a0f2ca # Parent e196e2160515a436b62011ecc4d1ff045007adfa (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. diff -r e196e2160515 -r 82157c2afd44 lisp/buff-menu.el --- a/lisp/buff-menu.el Sun Nov 27 23:54:40 2005 +0000 +++ b/lisp/buff-menu.el Sun Nov 27 23:55:30 2005 +0000 @@ -210,7 +210,12 @@ (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)