Skip to content

Instantly share code, notes, and snippets.

@YoungFrog
Created July 25, 2013 11:22
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 YoungFrog/6078836 to your computer and use it in GitHub Desktop.
Save YoungFrog/6078836 to your computer and use it in GitHub Desktop.
show result of evalution to other by adding an arrow
(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