# HG changeset patch # User Augie Fackler # Date 1469502768 14400 # Node ID 1cda3348f36b29ab54005788596e33e94941f489 # Parent 98484e1f564f23847c0b1ed35a56a3d303bd4b0f emacs f4 dwim: bind rust files to running tests with cargo diff --git a/.elisp/settings/90.keybindings.el b/.elisp/settings/90.keybindings.el --- 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)