Last active
December 21, 2015 07:09
-
-
Save krisajenkins/6269648 to your computer and use it in GitHub Desktop.
Add flashy flashing to Emacs eval calls.
This file contains 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
(require 'nrepl-eval-sexp-fu) | |
(setq nrepl-eval-sexp-fu-flash-duration 0.25) | |
(defadvice lisp-eval-region (around lisp-eval-region-flash activate) | |
"Flash any calls to lisp-eval-region (and the functions that depend on it, like lisp-eval-defun)." | |
(let* ((start (ad-get-arg 0)) | |
(end (ad-get-arg 1)) | |
(flasher (nrepl-eval-sexp-fu-flash (cons start end))) | |
(hi (cadr flasher)) | |
(unhi (caddr flasher))) | |
(nrepl-eval-sexp-fu-flash-doit-simple '(lambda () ad-do-it) hi unhi))) |
This file contains 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
M-x package-install RET nrepl-eval-sexp-fu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some might call this mere eye candy, but I actually find the visual feedback very useful.