From: Dmitry Gutov Date: Thu, 1 Apr 2021 22:24:57 +0000 (+0300) Subject: Fix C-u project-find-regexp's default dir X-Git-Tag: emacs-28.0.90~3048 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4798dc0c51381f36cd45160640c4f55a7792750b;p=emacs.git Fix C-u project-find-regexp's default dir * lisp/progmodes/project.el (project-find-regexp): Default read-directory-name to the current default-directory when called with C-u (bug#47012). --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 4101962f06a..3dd11118ea1 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -732,13 +732,14 @@ requires quoting, e.g. `\\[quoted-insert]'." (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))))))