[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0a07603ae8d: project-recompile: New command
From: |
Dmitry Gutov |
Subject: |
master 0a07603ae8d: project-recompile: New command |
Date: |
Sun, 21 Jan 2024 00:09:00 -0500 (EST) |
branch: master
commit 0a07603ae8db41f69e83b1bfec6e28a92f737852
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
project-recompile: New command
* lisp/progmodes/project.el (project-recompile):
New command (bug#68570).
---
lisp/progmodes/project.el | 13 +++++++++++++
1 file changed, 13 insertions(+)
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
(defvar compilation-read-command)
(declare-function compilation-read-command "compile")
+(declare-function recompile "compile")
(defun project-prefixed-buffer-name (mode)
(concat "*"
@@ -1396,6 +1397,18 @@ If non-nil, it overrides
`compilation-buffer-name-function' for
compilation-buffer-name-function)))
(call-interactively #'compile)))
+(defun project-recompile (&optional edit-command)
+ "Run `recompile' with appropriate buffer."
+ (declare (interactive-only recompile))
+ (interactive "P")
+ (let ((compilation-buffer-name-function
+ (or project-compilation-buffer-name-function
+ ;; Should we error instead? When there's no
+ ;; project-specific naming, there is no point in using
+ ;; this command.
+ compilation-buffer-name-function)))
+ (recompile edit-command)))
+
(defcustom project-ignore-buffer-conditions nil
"List of conditions to filter the buffers to be switched to.
If any of these conditions are satisfied for a buffer in the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0a07603ae8d: project-recompile: New command,
Dmitry Gutov <=