emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/consult cf9b877: consult--directory-prompt: Ensure that


From: ELPA Syncer
Subject: [elpa] externals/consult cf9b877: consult--directory-prompt: Ensure that this-command is preserved (See #368)
Date: Sun, 1 Aug 2021 17:57:07 -0400 (EDT)

branch: externals/consult
commit cf9b877095d1b5524de8efc3b467dd4341ab97e8
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    consult--directory-prompt: Ensure that this-command is preserved (See #368)
---
 consult.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/consult.el b/consult.el
index 7f32a55..5955092 100644
--- a/consult.el
+++ b/consult.el
@@ -711,7 +711,13 @@ Then the `consult-project-root-function' is tried.
 Otherwise the `default-directory' is returned."
   (cond
    ((stringp dir) (consult--directory-prompt-1 prompt dir))
-   (dir (consult--directory-prompt-1 prompt (read-directory-name "Directory: " 
nil nil t)))
+   (dir (consult--directory-prompt-1
+         prompt
+         ;; HACK Preserve this-command across `read-directory-name' call,
+         ;; such that `consult-customize' continues to work.
+         ;; TODO Find a better and more general solution which preserves 
`this-command'.
+         (let ((this-command this-command))
+           (read-directory-name "Directory: " nil nil t))))
    ((when-let (root (consult--project-root))
       (cons (format "%s in project %s: " prompt (consult--project-name root))
             root)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]