changeset 398:1cda3348f36b

emacs f4 dwim: bind rust files to running tests with cargo
author Augie Fackler <raf@durin42.com>
date Mon, 25 Jul 2016 23:12:48 -0400
parents 98484e1f564f
children 1a85ad164ae7
files .elisp/settings/90.keybindings.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.elisp/settings/90.keybindings.el
+++ b/.elisp/settings/90.keybindings.el
@@ -23,7 +23,10 @@
 (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))))))
+          (concat "make " (file-name-nondirectory buffer-file-name))))
+        ((string-match "\\.rs$" buffer-file-name)
+         (textmate-start-compile-in-root "cargo test"))
+        ))
 (global-set-key [f4] 'af-dwim-f4)
 (global-set-key [f5] 'diff-apply-hunk)