branch: externals/consult
commit fd110782aaddbfe55b8565d112de07f9366337a3
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    consult--temporary-files: Fix let binding of non-essential (Fix #513)
---
 consult.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/consult.el b/consult.el
index 0dcc3ecd6d..5c8aaa87d2 100644
--- a/consult.el
+++ b/consult.el
@@ -1051,7 +1051,11 @@ MARKER is the cursor position."
          (dir default-directory))
     (lambda (&optional name)
       (if name
-          (let ((default-directory dir))
+          (let ((default-directory dir)
+                (inhibit-message t)
+                (enable-dir-local-variables nil)
+                (enable-local-variables (and enable-local-variables :safe))
+                (non-essential t))
             (or (get-file-buffer name)
                 ;; file-attributes may throw permission denied error
                 (when-let* ((attrs (ignore-errors (file-attributes name)))
@@ -1063,10 +1067,6 @@ MARKER is the cursor position."
                     (cl-letf* (((default-value 'find-file-hook)
                                 (seq-remove (lambda (x) (memq x 
consult-preview-excluded-hooks))
                                             (default-value 'find-file-hook)))
-                               (inhibit-message t)
-                               (non-essential t)
-                               (enable-dir-local-variables nil)
-                               (enable-local-variables (and 
enable-local-variables :safe))
                                (buf (find-file-noselect
                                      name 'nowarn
                                      (> size consult-preview-raw-size))))

Reply via email to