emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Docs submitted (Was Re: Advice sought on managing decis


From: Tom Breton (Tehom)
Subject: Re: [Orgmode] Docs submitted (Was Re: Advice sought on managing decision alternatives.)
Date: Wed, 11 Feb 2009 15:02:23 -0500 (EST)
User-agent: SquirrelMail/1.4.13

>
> Hi Tom,
>
> maybe you can educate me:  I have never understood what the "#" does
> in code like the one you have here.  You are using it, so maybe you
> know?
>
> - Carsten
>
>

Here, it's   #'   that it of interest, not  #  alone.

At the most direct level, it quotes the symbol with `function' instead of
`quote'.  For example:

(format "%s" ' 'foo)  => "(quote foo)"
(format "%s" ' #'foo) => "(function foo)"

What it accomplishes:
 * In some contexts, it is needed to get a symbol's function binding
instead of its value binding.
 * It alerts the byte-compiler that it's seeing a function, so it can
perform certain optimizations (I don't know offhand exactly what).
 * Stylistically, it alerts the reader.

It's an imitation of Common Lisp's reader macro  #'  which does sort of
the same thing.

At the syntax level, it's really a combination of   #   which signals a
reader macro - though in emacs, it's all hard-coded and inextensible - and
 '  which stands for the function-quote reader macro.

FWIW, what I added to lread.c was an extension of the reader macro
facility at RMS' request, so you definitely asked the right guy.

Tom Breton (Tehom)






reply via email to

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