Fix #2524: :make executing wrong command

This commit is contained in:
Henrik Lissner 2020-02-20 17:42:58 -05:00
parent 037bcf3c12
commit 888d456dc9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 8 additions and 6 deletions

View file

@ -73,8 +73,9 @@
(evil-ex-define-cmd "pg[grep]d" #'+helm:project-search-from-cwd))) (evil-ex-define-cmd "pg[grep]d" #'+helm:project-search-from-cwd)))
;;; Project tools ;;; Project tools
(evil-ex-define-cmd "compile" #'+evil:compile) (evil-ex-define-cmd "com[pile]" #'+evil:compile)
(evil-ex-define-cmd "mak[e]" #'+evil:make) (evil-ex-define-cmd "make" #'+evil:make)
(evil-ex-define-cmd "mk" #'+evil:make) ; convenience alias
(evil-ex-define-cmd "debug" #'+debugger/start) (evil-ex-define-cmd "debug" #'+debugger/start)
(evil-ex-define-cmd "er[rors]" #'flycheck-list-errors) (evil-ex-define-cmd "er[rors]" #'flycheck-list-errors)

View file

@ -110,10 +110,11 @@ If BANG is non-nil, open compilation output in a comint buffer.
If BANG, then run ARGUMENTS as a full command. This command understands vim file If BANG, then run ARGUMENTS as a full command. This command understands vim file
modifiers (like %:p:h). See `+evil-resolve-vim-path-a' for details." modifiers (like %:p:h). See `+evil-resolve-vim-path-a' for details."
(interactive "<sh><!>") (interactive "<sh><!>")
(+evil:compile (format "make %s" (let ((compile-command "make"))
(evil-ex-replace-special-filenames (+evil:compile (if (stringp arguments)
arguments)) (evil-ex-replace-special-filenames arguments)
bang)) "")
bang)))
;;;###autoload (autoload '+evil:compile "editor/evil/autoload/ex" nil t) ;;;###autoload (autoload '+evil:compile "editor/evil/autoload/ex" nil t)
(evil-define-command +evil:compile (arguments &optional bang) (evil-define-command +evil:compile (arguments &optional bang)