summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-09-11 00:28:04 -0400
committerKyle Meyer <kyle@kyleam.com>2014-09-11 00:28:04 -0400
commit90ca7751ed5ea723a465b73665894e0863988fce (patch)
tree22ca6a86aca3be73fb9713a061a8bee55a91bfe8 /lisp
parent75cdf9ca439508c0728fa2e43698db7395d0d1f7 (diff)
downloademacs.d-90ca7751ed5ea723a465b73665894e0863988fce.tar.gz
Add recompile-current-compilation
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-external.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/init-external.el b/lisp/init-external.el
index dbf1862..cea0d1f 100644
--- a/lisp/init-external.el
+++ b/lisp/init-external.el
@@ -68,11 +68,19 @@ monitor setup)."
(display-buffer comp-buffer)
(user-error "No compilation buffer")))
+(defun km/recompile-current-compilation ()
+ (interactive)
+ (-if-let (comp-buffer (get-buffer "*compilation*"))
+ (with-current-buffer comp-buffer
+ (recompile))
+ (user-error "No compilation buffer")))
+
(define-prefix-command 'km/compile-map)
(global-set-key (kbd "C-c c") 'km/compile-map)
(define-key km/compile-map "c" 'compile)
(define-key km/compile-map "g" 'recompile)
+(define-key km/compile-map "r" 'km/recompile-current-compilation)
(define-key km/compile-map "o" 'km/display-compilation-other-window)
;;; Diff