Morgan Smith <[email protected]> writes:

> Pedro Andres Aranda Gutierrez <[email protected]> writes:
>
>> 1. make sure that the preferred way of calling lambda is used: 
>> #'(lambda()...)
>
> Quick question: Why?
>
> The info manual [[info:elisp#Anonymous Functions]] says the following:
>
> #+begin_example
>    The read syntax ‘#'’ is a short-hand for using ‘function’.  The
> following forms are all equivalent:
>
>      (lambda (x) (* x x))
>      (function (lambda (x) (* x x)))
>      #'(lambda (x) (* x x))
> #+end_example
>
> I have known the manual to be wrong before so I'm not doubting you, I
> would just like to know why for my own knowledge (and maybe so we can
> fix the manual if there's an omission).

Strictly speaking, it is a question of style. There is indeed no
difference. But #'(lambda ...) clearly indicates that it is intended to
be a function, not data.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to