Emacs: Use (compile compile-command) instead of recompile
parent
6070a80ecf
commit
510b229ee7
|
@ -220,7 +220,7 @@
|
|||
;; Don't set these bindings in mickey as we might have to override them from
|
||||
;; mode hooks.
|
||||
(global-set-key (kbd "C-<f10>") 'compile)
|
||||
(global-set-key (kbd "<f10>") 'recompile)
|
||||
(global-set-key (kbd "<f10>") (lambda () (interactive) (compile compile-command))) ; Do not use recompile since we want to change de compilation folder to the current buffer.
|
||||
(global-set-key (kbd "<f11>") 'previous-error)
|
||||
(global-set-key (kbd "<f12>") 'next-error)
|
||||
|
||||
|
|
|
@ -22,6 +22,13 @@
|
|||
"-E gofmt")
|
||||
" ") "Additional arguments to pass to gometalinter.")
|
||||
|
||||
(defun go-metalinter (arg)
|
||||
(interactive "P")
|
||||
(let ((compile-command (format "gometalinter %s" gometalinter-args)))
|
||||
(if arg
|
||||
(call-interactively 'compile)
|
||||
(compile compile-command))))
|
||||
|
||||
(defun go-set-compile-command ()
|
||||
"Set `compile-command' depending on the context.
|
||||
|
||||
|
@ -49,13 +56,6 @@ Note that the -cover test flag is left out since it shifts line numbers."
|
|||
(and looping (not (string= dir "/")))))
|
||||
(if (string= dir "/") nil t))))
|
||||
|
||||
(defun go-metalinter (arg)
|
||||
(interactive "P")
|
||||
(let ((compile-command (format "gometalinter %s" gometalinter-args)))
|
||||
(if arg
|
||||
(recompile t)
|
||||
(compile compile-command))))
|
||||
|
||||
(when (require 'go-guru nil t)
|
||||
(unless (executable-find "guru")
|
||||
; Requires `call-process-to-string' from `functions'."
|
||||
|
|
|
@ -133,7 +133,7 @@ This does not interfere with `subword-mode'."
|
|||
")
|
||||
;; (set (make-local-variable 'use-hard-newlines) t)
|
||||
(local-set-key (kbd "<f9>") 'tex-pdf-view)
|
||||
(local-set-key (kbd "<f10>") (lambda () (interactive) (progn (recompile) (sit-for tex-compilation-delay) (delete-windows-on "*compilation*"))))
|
||||
(local-set-key (kbd "<f10>") (lambda () (interactive) (progn (compile compile-command) (sit-for tex-compilation-delay) (delete-windows-on "*compilation*"))))
|
||||
(tex-set-compiler)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
Loading…
Reference in New Issue