From: Dmitry Gutov Date: Sat, 19 Dec 2020 22:16:32 +0000 (+0200) Subject: Jamie Beardslee X-Git-Tag: emacs-28.0.90~4648 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=32e781b2f1e2cbf2bed323247b13dca3ed53fc71;p=emacs.git Jamie Beardslee * lisp/progmodes/project.el (project-execute-extended-command): New command. (project-prefix-map): Binding for it. Copyright-paperwork-exempt: yes --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index d786c3f967a..5b58090de02 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -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))) + ;;; Project switching