[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1513ee3: Change default-directory before prompting in project-com
From: |
Dmitry Gutov |
Subject: |
master 1513ee3: Change default-directory before prompting in project-compile |
Date: |
Fri, 15 Jan 2021 23:00:31 -0500 (EST) |
branch: master
commit 1513ee37a4defbf1db7f26d1e8148843416dc987
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Change default-directory before prompting in project-compile
This causes command completion to work from the project root, letting
users complete top-level folders, make targets, etc (bug#45765).
* lisp/progmodes/project.el (project-compile): Simplify using
call-interactively, as done with project(-async)-shell-command.
---
lisp/progmodes/project.el | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 62c3cf4..06966f3 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -970,20 +970,11 @@ loop using the command \\[fileloop-continue]."
(declare-function compilation-read-command "compile")
;;;###autoload
-(defun project-compile (command &optional comint)
- "Run `compile' in the project root.
-Arguments the same as in `compile'."
- (interactive
- (list
- (let ((command (eval compile-command)))
- (require 'compile)
- (if (or compilation-read-command current-prefix-arg)
- (compilation-read-command command)
- command))
- (consp current-prefix-arg)))
- (let* ((pr (project-current t))
- (default-directory (project-root pr)))
- (compile command comint)))
+(defun project-compile ()
+ "Run `compile' in the project root."
+ (interactive)
+ (let ((default-directory (project-root (project-current t))))
+ (call-interactively #'compile)))
(defun project--read-project-buffer ()
(let* ((pr (project-current t))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1513ee3: Change default-directory before prompting in project-compile,
Dmitry Gutov <=