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>
Fri, 3 Jul 2020 16:18:46 +0000 (18:18 +0200)
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 28f8075..4a141b7 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -2126,7 +2126,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)