help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: run-with-timer does not display message


From: Drew Adams
Subject: RE: run-with-timer does not display message
Date: Sat, 19 Jul 2014 11:04:53 -0700 (PDT)

> >> M-: (run-with-timer 5 nil '(lambda () (message "hello")))
> >                             ^^^^^^^^
> 
> I'm focusing on trying to kill the nasty '(lambda ...) habit that
> people keep reproducing all over the place because it appears in
> so many examples.

And we might as well say *why* it should be killed: When you quote
a lambda form, the code simply creates a *list* (whose car is `lambda'
etc.) when it is evaluated.  That list can then be interpreted as a
function (or not, depending on the context - it is just a list).

But if you do not quote, then the lambda form is understood
immediately as being a *function*.  And that means that occurrences
of that function can be byte-compiled etc.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]