]> git.eshelyaron.com Git - emacs.git/commitdiff
Jamie Beardslee <beardsleejamie@gmail.com>
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 19 Dec 2020 22:16:32 +0000 (00:16 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 19 Dec 2020 22:16:48 +0000 (00:16 +0200)
* lisp/progmodes/project.el (project-execute-extended-command):
New command.
(project-prefix-map): Binding for it.

Copyright-paperwork-exempt: yes

lisp/progmodes/project.el

index d786c3f967a7aa47902490816bed2970c90627fc..5b58090de02346f588b829c08131163e9f62a5bb 100644 (file)
@@ -631,6 +631,7 @@ DIRS must contain directory names."
     (define-key map "g" 'project-find-regexp)
     (define-key map "G" 'project-or-external-find-regexp)
     (define-key map "r" 'project-query-replace-regexp)
+    (define-key map "x" 'project-execute-extended-command)
     map)
   "Keymap for project commands.")
 
@@ -1246,6 +1247,14 @@ It's also possible to enter an arbitrary directory not in the list."
   (project--ensure-read-project-list)
   (mapcar #'car project--list))
 
+;;;###autoload
+(defun project-execute-extended-command ()
+  "Execute an extended command in project root."
+  (declare (interactive-only command-execute))
+  (interactive)
+  (let ((default-directory (project-root (project-current t))))
+    (call-interactively #'execute-extended-command)))
+
 \f
 ;;; Project switching