[Top][All Lists]

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

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

From: Carsten Dominik
Subject: Re: [Orgmode] Docs submitted (Was Re: Advice sought on managing decision alternatives.)
Date: Thu, 12 Feb 2009 00:45:20 +0100

On Feb 11, 2009, at 9:02 PM, Tom Breton (Tehom) wrote:

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

- 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.

OK, thanks a lot!

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.

:-)  Thanks for the explanations.

Tom Breton (Tehom)

reply via email to

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