]> git.eshelyaron.com Git - emacs.git/commitdiff
Integrate project-switch-project with project-find-regexp
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 12 May 2020 01:20:26 +0000 (04:20 +0300)
committerSimen Heggestøyl <simenheg@gmail.com>
Tue, 26 May 2020 15:41:24 +0000 (17:41 +0200)
* lisp/progmodes/project.el:
(project-find-regexp): Add to the list of 'switch' commands.
(project-switch-project): Use call-interactively so that the
former can read its arguments.

lisp/progmodes/project.el

index 12b7e3fdb939dfd86c898b52a9fe40197a9360a4..da865255e36a67e7645131cbb8ef847a892cc4fa 100644 (file)
@@ -808,6 +808,9 @@ LABEL is used to distinguish the function in the dispatch menu."
 (project-add-switch-command
  'project-find-file "f" "Find file")
 
+(project-add-switch-command
+ 'project-find-regexp "g" "Find regexp")
+
 (project-add-switch-command
  'project-dired "d" "Dired")
 
@@ -841,7 +844,7 @@ and presented in a dispatch menu."
     (if (equal choice (kbd "C-g"))
         (message "Quit")
       (let ((default-directory dir))
-        (funcall (assoc-default choice project--switch-alist))))))
+        (call-interactively (assoc-default choice project--switch-alist))))))
 
 (provide 'project)
 ;;; project.el ends here