diff options
| author | Dmitry Gutov | 2020-12-20 00:16:32 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2020-12-20 00:16:48 +0200 |
| commit | 32e781b2f1e2cbf2bed323247b13dca3ed53fc71 (patch) | |
| tree | 768004b1490592637a2bfd2d5171e544f8b6fc4a | |
| parent | b9edbaed01a91d5fc6235fc679d8e0cd827f6fa9 (diff) | |
| download | emacs-32e781b2f1e2cbf2bed323247b13dca3ed53fc71.tar.gz emacs-32e781b2f1e2cbf2bed323247b13dca3ed53fc71.zip | |
Jamie Beardslee <beardsleejamie@gmail.com>
* lisp/progmodes/project.el (project-execute-extended-command):
New command.
(project-prefix-map): Binding for it.
Copyright-paperwork-exempt: yes
| -rw-r--r-- | lisp/progmodes/project.el | 9 |
1 files changed, 9 insertions, 0 deletions
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." | |||
| 631 | (define-key map "g" 'project-find-regexp) | 631 | (define-key map "g" 'project-find-regexp) |
| 632 | (define-key map "G" 'project-or-external-find-regexp) | 632 | (define-key map "G" 'project-or-external-find-regexp) |
| 633 | (define-key map "r" 'project-query-replace-regexp) | 633 | (define-key map "r" 'project-query-replace-regexp) |
| 634 | (define-key map "x" 'project-execute-extended-command) | ||
| 634 | map) | 635 | map) |
| 635 | "Keymap for project commands.") | 636 | "Keymap for project commands.") |
| 636 | 637 | ||
| @@ -1246,6 +1247,14 @@ It's also possible to enter an arbitrary directory not in the list." | |||
| 1246 | (project--ensure-read-project-list) | 1247 | (project--ensure-read-project-list) |
| 1247 | (mapcar #'car project--list)) | 1248 | (mapcar #'car project--list)) |
| 1248 | 1249 | ||
| 1250 | ;;;###autoload | ||
| 1251 | (defun project-execute-extended-command () | ||
| 1252 | "Execute an extended command in project root." | ||
| 1253 | (declare (interactive-only command-execute)) | ||
| 1254 | (interactive) | ||
| 1255 | (let ((default-directory (project-root (project-current t)))) | ||
| 1256 | (call-interactively #'execute-extended-command))) | ||
| 1257 | |||
| 1249 | 1258 | ||
| 1250 | ;;; Project switching | 1259 | ;;; Project switching |
| 1251 | 1260 | ||