I was told that I should not quote lambda, let's say
(global-set-key (quote [f3]) '(lambda () (interactive) (other-window -1) ))
I tried, really, if I don't quote lambda, it works equally well
(global-set-key (quote [f3]) (lambda () (interactive) (other-window -1) ))
However, I do not understand why the latter works (and is also preferred, and now that the latter works, why the first works).
If the lambda expression is defined as another function, we would call
(global-set-key (quote [f3]) 'my-function)
to prevent an instant evaluation of my function. I understand lambda expression as an anonymous version of my function. So why not quote lambda?
Thanks!
emacs elisp
Yi wang
source share