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

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

Re: Meaning of the hash character


From: Juanma Barranquero
Subject: Re: Meaning of the hash character
Date: Thu, 20 Nov 2008 15:16:53 +0100

On Thu, Nov 20, 2008 at 14:35, Nordlöw <address@hidden> wrote:

> I have long wondered about the meaning of the hash character # in
> emacs lisp.

From the "Anonymous Functions" node of the Emacs Lisp Reference:

   The read syntax `#'' is a short-hand for using `function'.  For
example,

     #'(lambda (x) (* x x))

is equivalent to

     (function (lambda (x) (* x x)))

 -- Special Form: function function-object
     This special form returns FUNCTION-OBJECT without evaluating it.
     In this, it is equivalent to `quote'.  However, it serves as a
     note to the Emacs Lisp compiler that FUNCTION-OBJECT is intended
     to be used only as a function, and therefore can safely be
     compiled.  Contrast this with `quote', in *Note Quoting::.

   *Note describe-symbols example::, for a realistic example using
`function' and an anonymous function.

  Juanma

reply via email to

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