branch: externals/inspector
commit c2670a259d43d75eae9e0e5dd794ed6feee962fa
Author: Vincent Ambo <taz...@tvl.su>
Commit: Vincent Ambo <taz...@tvl.su>

    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 6e36c4a034..fcf194d5c6 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))

Reply via email to