Created
July 25, 2013 11:22
-
-
Save YoungFrog/6078836 to your computer and use it in GitHub Desktop.
show result of evalution to other by adding an arrow
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
(defun yf/rcirc-eval-last-sexp () | |
"Like `eval-last-sexp', but add an arrow when inserting results | |
into buffer." | |
(interactive) | |
(let ((opoint (point)) | |
(cpa current-prefix-arg)) | |
(call-interactively 'eval-last-sexp) | |
(when cpa | |
(save-excursion | |
(goto-char opoint) | |
(insert " => "))))) | |
(define-key rcirc-mode-map (kbd "C-x C-e") 'yf/rcirc-eval-last-sexp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment