Created
July 28, 2016 19:20
-
-
Save fstamour/2d7569beaf42c0a0883dc0ae559c6638 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 slime-eval-save-output (string) | |
"Evaluate STRING in Lisp and save the result in the kill ring." | |
(slime-eval-async `(swank:eval-and-grab-output ,string) | |
(lambda (result) | |
(cl-destructuring-bind (output value) result | |
(kill-new output) | |
(message "Evaluation finished; pushed output to kill ring."))))) | |
(defun lisp-eval-defun-in-kill-ring () | |
(interactive) | |
(slime-eval-save-output (slime-defun-at-point))) | |
(global-set-key (kbd "C-M-z") 'lisp-eval-defun-in-kill-ring) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment