From c2670a259d43d75eae9e0e5dd794ed6feee962fa Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 14 Sep 2023 21:38:13 +0300 Subject: [PATCH] Only locally bind `revert-buffer-function' Setting this variable globally causes #'revert-file to stop working. I got very confused by this, as Emacs was prompting me about a file I was editing having changed on disk, but me being unable to reload it. Note that this is *not* required for the following line because that variable automatically becomes buffer-local when set. --- inspector.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inspector.el b/inspector.el index 6e36c4a..fcf194d 100644 --- a/inspector.el +++ b/inspector.el @@ -780,7 +780,7 @@ is expected to be used.") buf)))) (with-current-buffer buffer (add-hook 'xref-backend-functions 'elisp--xref-backend 0 'local) - (setq revert-buffer-function #'inspector--revert-buffer) + (setq-local revert-buffer-function #'inspector--revert-buffer) (setq buffer-read-only nil) (erase-buffer)) buffer))