[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add-hook
From: |
Sebastian Tennant |
Subject: |
Re: add-hook |
Date: |
Thu, 07 Jun 2007 13:00:44 +0300 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux) |
Quoth Thien-Thi Nguyen <ttn@gnuvola.org>:
> () Sebastian Tennant <sebyte@smolny.plus.com>
> () Thu, 07 Jun 2007 03:20:33 +0300
>
> Perhaps someone could explain why it is lambda
> functions don't need to be quoted in this context?
>
> in elisp, the form `(lambda ARGS BODY)' is self-quoting in
> all contexts, like numbers and strings. sometimes you see:
>
> (function (lambda ...))
> #'(lambda ...)
>
> these serve as hints to the byte compiler that the form
> should be compiled. on the other hand, if you see:
>
> '(lambda ...)
>
> then that tells the compiler to treat the form as data (DON'T compile).
> if you aren't byte compiling, quoting is strictly optional.
>
> thi
Many thanks.
I was aware that everything boils down to lambda functions in lisp but
it hadn't occured to me that they are self quoting in all contexts,
although now I think about it I realise they _have_ to be
self-quoting, given that they are one of the fundamental building
blocks...
(info "(elisp)Anonymous Functions"):
In Lisp, a function is a list that starts with `lambda', a byte-code
function compiled from such a list, or alternatively a primitive
subr-object; names are "extra."
Sebastian
- add-hook, Sebastian Tennant, 2007/06/06
- Re: add-hook, Sebastian Tennant, 2007/06/06
- Message not available
- Re: add-hook, Thien-Thi Nguyen, 2007/06/07
- Re: add-hook,
Sebastian Tennant <=
- Message not available
- Re: add-hook, Thien-Thi Nguyen, 2007/06/07