comparison .elisp/settings/90.keybindings.el @ 420:11fdb5a60eee

emacs: bind f4 to a smarter command in .t files
author Augie Fackler <raf@durin42.com>
date Tue, 29 Nov 2016 13:29:41 -0500
parents 1cda3348f36b
children eff0298b770d
comparison
equal deleted inserted replaced
419:ced3c6a3e02a 420:11fdb5a60eee
21 21
22 (global-set-key [f3] 'next-error) 22 (global-set-key [f3] 'next-error)
23 (defun af-dwim-f4 () (interactive) 23 (defun af-dwim-f4 () (interactive)
24 (cond ((string-match "\\.t$" buffer-file-name) 24 (cond ((string-match "\\.t$" buffer-file-name)
25 (textmate-start-compile-in-root 25 (textmate-start-compile-in-root
26 (concat "make " (file-name-nondirectory buffer-file-name)))) 26 (concat "cd tests && python run-tests.py --local -j 2 "
27 (file-name-nondirectory buffer-file-name))))
27 ((string-match "\\.rs$" buffer-file-name) 28 ((string-match "\\.rs$" buffer-file-name)
28 (textmate-start-compile-in-root "cargo test")) 29 (textmate-start-compile-in-root "cargo test"))
29 )) 30 ))
30 (global-set-key [f4] 'af-dwim-f4) 31 (global-set-key [f4] 'af-dwim-f4)
31 (global-set-key [f5] 'diff-apply-hunk) 32 (global-set-key [f5] 'diff-apply-hunk)