mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
project-recompile: Autoload and run in project root
* lisp/progmodes/project.el (project-recompile): Autoload and use project root as `default-directory' (bug#74631).
This commit is contained in:
parent
4eea545bbc
commit
be51f13491
1 changed files with 3 additions and 4 deletions
|
|
@ -1486,15 +1486,14 @@ If non-nil, it overrides `compilation-buffer-name-function' for
|
|||
compilation-buffer-name-function)))
|
||||
(call-interactively #'compile)))
|
||||
|
||||
;;;###autoload
|
||||
(defun project-recompile (&optional edit-command)
|
||||
"Run `recompile' with appropriate buffer."
|
||||
(declare (interactive-only recompile))
|
||||
(interactive "P")
|
||||
(let ((compilation-buffer-name-function
|
||||
(let ((default-directory (project-root (project-current t)))
|
||||
(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)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue