I'm new to emacs so I need simple tip. I'd like to use Command-RET to eval last expression - to do this:
clojure-mode.el:
(define-key map "\C-x\C-e" 'lisp-eval-last-sexp)
And I don't want to change original clojure-mode.el file. How can I define key binding that will execute C-x\C-e and that will call 'lisp-eval-last-sexp? It would be great solution for me, because I can't bind Command-RET directly with:
local-set-key
to 'lisp-eval-last-sexp, emacs can't find this function.
thanks in advance, Bartek
Update:
finally it turned out that I needed to write:
M-x
describe-key
^X ^E
and it returned me:
^X ^E runs the command slime-eval-last-expression, which is an
interactive Lisp function in `slime.el'.
It is bound to ^X ^E, <menu-bar> <SLIME> <Evaluation> <Eval Last
Expression>, <A-return>.
(slime-eval-last-expression)
Evaluate the expression preceding point.
[back]
and then I bound my keys to function
'slime-eval-last-expression
thanks for your help :)
eval-last-sexp
notlisp-eval-last-sexp
? – Miserable Variable