emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: Docs submitted
       [not found] <20090211130712.26E5E2935B@mailhost.cs.tu-berlin.de>
@ 2009-02-11 14:38 ` Stephan Schmitt
  0 siblings, 0 replies; 2+ messages in thread
From: Stephan Schmitt @ 2009-02-11 14:38 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Tom Breton (Tehom)

> > (eval-after-load 'org
> >  '(progn
> > ;;^--HERE.
> >     (add-to-list 'org-todo-setup-filter-hook
> > 		  #'org-choose-setup-filter)
> >     (add-to-list 'org-todo-get-default-hook
> > 		  #'org-choose-get-default-mark)
> >     (add-to-list 'org-trigger-hook
> > 		  #'org-choose-keep-sensible)
> >     (add-to-list 'org-todo-interpretation-widgets
> > 		  '(:tag "Choose   (to record decisions)" choose)
> > 		  'append)
> >   ))
> >
> 
> 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


Hi,

from [[info:elisp:Anonymous%20Functions]]:

>    We sometimes write `function' instead of `quote' when quoting the
> name of a function, but this usage is just a sort of comment:
> 
>      (function SYMBOL) == (quote SYMBOL) == 'SYMBOL
> 
>    The read syntax `#'' is a short-hand for using `function'.  For
> example,
> 
>      #'(lambda (x) (* x x))
> 
> is equivalent to
> 
>      (function (lambda (x) (* x x)))

so #'foo is the same as 'foo but indicates that foo is a function

hth,
	Stephan

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Docs submitted
  2009-02-11 12:29                       ` Carsten Dominik
@ 2009-02-11 14:58                         ` Bernt Hansen
  0 siblings, 0 replies; 2+ messages in thread
From: Bernt Hansen @ 2009-02-11 14:58 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, Tom Breton (Tehom)

Carsten Dominik <dominik@science.uva.nl> writes:

> On Feb 11, 2009, at 2:08 AM, Tom Breton (Tehom) wrote:
>
>> (eval-after-load 'org
>>  '(progn
>> ;;^--HERE.
>>     (add-to-list 'org-todo-setup-filter-hook
>> 		  #'org-choose-setup-filter)
>>     (add-to-list 'org-todo-get-default-hook
>> 		  #'org-choose-get-default-mark)
>>     (add-to-list 'org-trigger-hook
>> 		  #'org-choose-keep-sensible)
>>     (add-to-list 'org-todo-interpretation-widgets
>> 		  '(:tag "Choose   (to record decisions)" choose)
>> 		  'append)
>>   ))
>>
>
> 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?

As I understand it (from my book on Common Lisp) #'some-function is used
to quote function names.  'some-function quotes a variable.

It means "Get me the function with the following name" - without the #',
Lisp would treat some-function as the name of a variable and look up the
value of the variable, not the function.

-Bernt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-11 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20090211130712.26E5E2935B@mailhost.cs.tu-berlin.de>
2009-02-11 14:38 ` Docs submitted Stephan Schmitt
     [not found] <20090101170227.C707734803@mail2.panix.com>
2009-02-06 20:07 ` Advice sought on managing decision alternatives Tom Breton (Tehom)
2009-02-07  0:18   ` Carsten Dominik
2009-02-07 20:46     ` Tom Breton (Tehom)
2009-02-08 13:06       ` Carsten Dominik
2009-02-08 20:25         ` Tom Breton (Tehom)
2009-02-09  6:42           ` Carsten Dominik
2009-02-10  3:14             ` Docs submitted (Was Re: Advice sought on managing decision alternatives.) Tom Breton (Tehom)
2009-02-10  8:46               ` Manish
2009-02-10  9:12                 ` Carsten Dominik
2009-02-10 10:26                   ` Manish
2009-02-11  1:08                     ` Tom Breton (Tehom)
2009-02-11 12:29                       ` Carsten Dominik
2009-02-11 14:58                         ` Docs submitted Bernt Hansen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).