Skip to content

Instantly share code, notes, and snippets.

@tcrayford
Created January 13, 2010 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tcrayford/276535 to your computer and use it in GitHub Desktop.
Save tcrayford/276535 to your computer and use it in GitHub Desktop.
(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))
(defun set-face-to-one-color (face color)
(set-face-background face color)
(set-face-foreground face color))
(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