summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2020-05-12 04:20:26 +0300
committerDmitry Gutov <dgutov@yandex.ru>2020-05-12 04:20:26 +0300
commit90a749bde29bb417ed2cc4e4501ea5ebe9c8b435 (patch)
treef1f1557c7ee38f4abd6537ea28928f2c5bb3ed42
parent9cfc9c988abcb210f1d0a9f7b7c2fc7d7071a3a8 (diff)
downloademacs-scratch/project-switching-x.tar.gz
Integrate project-switch-project with project-find-regexpscratch/project-switching-x
* 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.
-rw-r--r--lisp/progmodes/project.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 39c122f75ff..ac56537b977 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -744,6 +744,9 @@ LABEL is used to distinguish the function in the dispatch menu."
'project-find-file "f" "Find file")
(project-add-switch-command
+ 'project-find-regexp "g" "Find regexp")
+
+(project-add-switch-command
'project-dired "d" "Dired")
(project-add-switch-command
@@ -776,7 +779,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