]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix C-u project-find-regexp's default dir
authorDmitry Gutov <dgutov@yandex.ru>
Thu, 1 Apr 2021 22:24:57 +0000 (01:24 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 1 Apr 2021 22:24:57 +0000 (01:24 +0300)
* lisp/progmodes/project.el (project-find-regexp):
Default read-directory-name to the current default-directory when
called with C-u (bug#47012).

lisp/progmodes/project.el

index 4101962f06ae7a3953f5ca50220b40dfd57e96a6..3dd11118ea19dce46ab6c604179f631981cc6827 100644 (file)
@@ -732,13 +732,14 @@ requires quoting, e.g. `\\[quoted-insert]<space>'."
   (interactive (list (project--read-regexp)))
   (require 'xref)
   (require 'grep)
-  (let* ((pr (project-current t))
+  (let* ((caller-dir default-directory)
+         (pr (project-current t))
          (default-directory (project-root pr))
          (files
           (if (not current-prefix-arg)
               (project-files pr)
             (let ((dir (read-directory-name "Base directory: "
-                                            nil default-directory t)))
+                                            caller-dir nil t)))
               (project--files-in-directory dir
                                            nil
                                            (grep-read-files regexp))))))