tabulated-list-revert-hook must have a local add
authorAlex Schroeder <alex@gnu.org>
Fri, 3 Jul 2020 16:18:46 +0000 (18:18 +0200)
committerAlex Schroeder <alex@gnu.org>
Thu, 29 Oct 2020 10:51:30 +0000 (11:51 +0100)
If we add elpher-menu-refresh to the global
tabulated-list-revert-hook, then other code that uses
tabulated-list-mode will confusingly sometimes end up creating the
elpher-menu. That's not good.

elpher.el

index f68a247..a4c8831 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -2131,7 +2131,7 @@ In Elpher Menu mode, the following commands are defined:
 \\[Buffer-menu-backup-unmark]  Back up a line and remove marks.
 \\[revert-buffer]    Update the list of buffers.
 \\[Buffer-menu-bury]    Bury the buffer listed on this line."
-  (add-hook 'tabulated-list-revert-hook 'elpher-menu-refresh))
+  (add-hook 'tabulated-list-revert-hook 'elpher-menu-refresh nil t))
 
 (defvar elpher-title nil)