aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2024-01-21 07:08:11 +0200
committerDmitry Gutov2024-01-21 07:08:43 +0200
commit0a07603ae8db41f69e83b1bfec6e28a92f737852 (patch)
treee5728ef467806aa113836b791e88c7415c9879d2
parentcc8d4b0c9110c1384f5a9c214cf4069b3e99ae9b (diff)
downloademacs-0a07603ae8db41f69e83b1bfec6e28a92f737852.tar.gz
emacs-0a07603ae8db41f69e83b1bfec6e28a92f737852.zip
project-recompile: New command
* lisp/progmodes/project.el (project-recompile): New command (bug#68570).
-rw-r--r--lisp/progmodes/project.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index a6f14a0865c..ab4504fa027 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1363,6 +1363,7 @@ If you exit the `query-replace', you can later continue the
1363 1363
1364(defvar compilation-read-command) 1364(defvar compilation-read-command)
1365(declare-function compilation-read-command "compile") 1365(declare-function compilation-read-command "compile")
1366(declare-function recompile "compile")
1366 1367
1367(defun project-prefixed-buffer-name (mode) 1368(defun project-prefixed-buffer-name (mode)
1368 (concat "*" 1369 (concat "*"
@@ -1396,6 +1397,18 @@ If non-nil, it overrides `compilation-buffer-name-function' for
1396 compilation-buffer-name-function))) 1397 compilation-buffer-name-function)))
1397 (call-interactively #'compile))) 1398 (call-interactively #'compile)))
1398 1399
1400(defun project-recompile (&optional edit-command)
1401 "Run `recompile' with appropriate buffer."
1402 (declare (interactive-only recompile))
1403 (interactive "P")
1404 (let ((compilation-buffer-name-function
1405 (or project-compilation-buffer-name-function
1406 ;; Should we error instead? When there's no
1407 ;; project-specific naming, there is no point in using
1408 ;; this command.
1409 compilation-buffer-name-function)))
1410 (recompile edit-command)))
1411
1399(defcustom project-ignore-buffer-conditions nil 1412(defcustom project-ignore-buffer-conditions nil
1400 "List of conditions to filter the buffers to be switched to. 1413 "List of conditions to filter the buffers to be switched to.
1401If any of these conditions are satisfied for a buffer in the 1414If any of these conditions are satisfied for a buffer in the