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

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

[elpa] externals/urgrep a9c1a98ea6 052/115: Prompt for directory first w


From: ELPA Syncer
Subject: [elpa] externals/urgrep a9c1a98ea6 052/115: Prompt for directory first with 'C-u C-u M-x urgrep'
Date: Wed, 10 May 2023 03:00:43 -0400 (EDT)

branch: externals/urgrep
commit a9c1a98ea665389d45cb4571d55783f05602caec
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>

    Prompt for directory first with 'C-u C-u M-x urgrep'
---
 urgrep.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/urgrep.el b/urgrep.el
index bd6bbca92d..64d3680d9a 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -904,8 +904,8 @@ Type \\[urgrep-set-before-context] to set the number of 
before context lines.
 Type \\[urgrep-set-after-context] to set the number of after context lines.
 Type \\[urgrep-set-file-wildcards] to set a wildcard to filter the files 
searched."
   (interactive
-   (list (urgrep--read-query nil)
-         (urgrep--read-directory current-prefix-arg)))
+   (let ((directory (urgrep--read-directory current-prefix-arg)))
+     (list (urgrep--read-query nil) directory)))
   (let* ((query (if (listp query) query (cons query rest)))
          (command (apply #'urgrep-command query))
          (tool (urgrep-get-tool (cadr (cl-member :tool query))))
@@ -919,10 +919,10 @@ Type \\[urgrep-set-file-wildcards] to set a wildcard to 
filter the files searche
 When called interactively, this behaves like `urgrep', but allows you
 to edit the command before running it."
   (interactive
-   (let ((query (urgrep--read-query nil)))
+   (let ((directory (urgrep--read-directory current-prefix-arg))
+         (query (urgrep--read-query nil)))
      (list (urgrep--read-command (apply #'urgrep-command query))
-           (urgrep--read-directory current-prefix-arg)
-           (cadr (cl-member :tool query)))))
+           directory (cadr (cl-member :tool query)))))
   (let ((tool (urgrep-get-tool tool))
         (default-directory (or directory default-directory)))
     (urgrep--start command command tool)))



reply via email to

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