emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Robert Goldman <rpgoldman@sift.info>
To: emacs-orgmode@gnu.org
Subject: Re: Docs submitted (really #')
Date: Wed, 11 Feb 2009 10:41:07 -0600	[thread overview]
Message-ID: <4992FFA3.9070004@sift.info> (raw)
In-Reply-To: <E1LXHgb-00059Z-Tw@box188.bluehost.com>


> Date: Wed, 11 Feb 2009 09:58:43 -0500
> From: Bernt Hansen <bernt@norang.ca>
> Subject: [Orgmode] Re: Docs submitted
> To: Carsten Dominik <dominik@science.uva.nl>
> Cc: emacs-orgmode@gnu.org, "Tom Breton \(Tehom\)" <tehom@panix.com>
> Message-ID: <87fxilggv0.fsf@gollum.intra.norang.ca>
> Content-Type: text/plain; charset=us-ascii
> 
> 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.
> 

In Common Lisp, #' is a reader macro that is an abbreviation for
function.  So #'foo is read as (function foo).

I'm not at all sure what #' means in elisp, which is not the same
programming language.  A quick peek at the Elisp info file didn't find
reader macros anywhere in there.

AFAIK for defining hooks a symbol will be interpreted as a function
name, won't it?  So replacing all of the #'s with 's above would work,
wouldn't it?

Best,
r

           reply	other threads:[~2009-02-11 16:41 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <E1LXHgb-00059Z-Tw@box188.bluehost.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4992FFA3.9070004@sift.info \
    --to=rpgoldman@sift.info \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).