On 01/22/2015 01:49 AM, David Kastrup wrote: > René Kyllingstad writes: > >> On Thu, Jan 22, 2015 at 10:17 AM, David Kastrup wrote: >>> That does not mean that I am convinced we want or need short-lambda. >> >> Both C++ and Java have "recently" added a succinct syntax for their equivalents. >> >> Given the amount of work it is to add features to either platform, >> quite a few people >> deemed it useful there. >> >> At least most peoples .emacs will look a bit tidier with a succinct >> anonymous lambda >> as an argument to add-hook :) > > You are aware that using add-hook with ad-hoc functions is a bad idea > since it may mean that you add the same functionality several times in > case the add-hook is executed multiple times? I occasionally use defun for that: (add-hook 'some-hook (defun foo () (bar)) This way, no matter how many times we evaluate the form, we install only one function. It's usually clearer to just define the function out of line though.