Created
January 13, 2010 20:08
-
-
Save tcrayford/276535 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun flash-modeline (color) | |
(setq old-background-face (copy-face 'modeline 'old-background-face)) | |
(setq old-buffer-id-face (copy-face 'modeline-buffer-id 'old-buffer-id-face)) | |
(set-face-to-one-color 'modeline color) | |
(set-face-to-one-color 'modeline-buffer-id color) | |
(sit-for 1) | |
(set-face-background 'mode-line (face-background old-background-face)) | |
(set-face-foreground 'mode-line (face-foreground old-background-face)) | |
(set-face-background 'mode-line-buffer-id (face-background old-buffer-id-face)) | |
(set-face-foreground 'mode-line-buffer-id (face-foreground old-buffer-id-face)) | |
(redraw-modeline)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun set-face-to-one-color (face color) | |
(set-face-background face color) | |
(set-face-foreground face color)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-run-tests () | |
(interactive) | |
(let ((test-buffer (hallway-test-buffer-for-imp))) | |
(save-buffer) | |
(with-current-buffer test-buffer | |
(save-buffer) | |
(clojure-test-run-tests)) | |
(sit-for 0 600) | |
(if | |
(string-match "0 failures" (current-message)) | |
(progn (flash-modeline "#00aa00") | |
(message (current-message))) | |
(progn (flash-modeline "#aa0000") | |
(switch-to-buffer test-buffer) | |
(clojure-test-show-result))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment