* Buffer-menu-revert-function
@ 2005-11-26 3:37 Luc Teirlinck
0 siblings, 0 replies; only message in thread
From: Luc Teirlinck @ 2005-11-26 3:37 UTC (permalink / raw)
When you enable autoreverting of the Buffer Menu, the current buffer
looses the `.', that normally gets prepended to it. This is
especially bad if you elect to sort the Buffer Menu in some order
other than visited order.
The reason is that `Buffer-menu-revert-function' has to be called with
*Buffer List* as the current buffer. The same problem would occur
whenever any Lisp function calls `Buffer-menu-revert-function'.
The patch below fixes this. I will install if there are no objections.
===File ~/buff-menu-diff====================================
*** buff-menu.el 29 Sep 2005 18:18:34 -0500 1.93
--- buff-menu.el 25 Nov 2005 21:26:07 -0600
***************
*** 210,216 ****
(prop (point-min))
;; do not make undo records for the reversion.
(buffer-undo-list t))
! (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)
--- 210,221 ----
(prop (point-min))
;; do not make undo records for the reversion.
(buffer-undo-list t))
! ;; 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)
============================================================
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-11-26 3:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-26 3:37 Buffer-menu-revert-function Luc Teirlinck
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.