branch: externals/consult
commit 69bba57ad7a7943b413a2bdbb41c15ee06a027a6
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    consult--temporary-files: Do not use (set-visited-file-name nil)
    
    It is sufficient to set the buffer-file-name to nil.
---
 consult.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/consult.el b/consult.el
index 73c9c914f8..d9057bfa31 100644
--- a/consult.el
+++ b/consult.el
@@ -1226,8 +1226,8 @@ ORIG is the original function, HOOKS the arguments."
                                 (when (buffer-live-p buf)
                                   (with-current-buffer buf
                                     (remove-hook 'pre-command-hook hook)
-                                    (set-visited-file-name nil)
-                                    (setq buffer-read-only t)))))
+                                    (setq buffer-read-only t
+                                          buffer-file-name nil)))))
                    (add-hook 'pre-command-hook hook))
                  ;; Only keep a few buffers alive
                  (while (> (length temporary-buffers) 
consult-preview-max-count)

Reply via email to