changeset 289:5fd871a98b5f

emacs: start making an f4-dwim function I've had one at work, but only now am getting around to it here.
author Augie Fackler <raf@durin42.com>
date Wed, 17 Oct 2012 08:21:15 -0500
parents e00b19603472
children 7a99481ab888
files .elisp/settings/90.keybindings.el
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.elisp/settings/90.keybindings.el
+++ b/.elisp/settings/90.keybindings.el
@@ -20,6 +20,11 @@
 (global-set-key [(control backspace)] 'kill-word)
 
 (global-set-key [f3] 'next-error)
+(defun af-dwim-f4 () (interactive)
+  (cond ((string-match "\\.t$" buffer-file-name)
+         (textmate-start-compile-in-root
+          (concat "make " (file-name-nondirectory buffer-file-name))))))
+(global-set-key [f4] 'af-dwim-f4)
 (global-set-key [f5] 'diff-apply-hunk)
 
 ;; M-j for jump to function definition