From: "Drew Adams" <drew.adams@oracle.com>
To: "'Matt Price'" <moptop99@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: RE: basic help evaluating function in an alist
Date: Sat, 1 Dec 2012 19:44:53 -0800 [thread overview]
Message-ID: <B5A7126D12854BFF89F76BDE5D6B1A4C@us.oracle.com> (raw)
In-Reply-To: <CAN_Dec-jh0HAF1i4PppCWkKRGz0d-Rf6tULDMhs=xcngbYaxFg@mail.gmail.com>
> > '(guide . (selected-window))
> >
> > (cons 'guide (selected-window))
>
> I still don't quite understand what it is in the
> syntax that causes the function (selected-window) to be evaluated in
> one case and not the other
In the first case, the dotted pair `(guide . (selected-window))' is quoted.
When evaluated, the sexp `(quote (guide . (selected-window)))' returns that
dotted pair: `(guide . (selected-window))'. `quote' returns its argument
without evaluating it.
In the second case, the sexp `(cons 'guide (selected-window))' is evaluated,
which means applying function `cons' to its two arguments, after evaluating each
of them.
Evaluation of the first argument, which is `(quote guide)', returns the symbol
`guide'. Evaluation of the second arg, `(selected-window)', returns the
selected window. Function `cons' then creates a cons cell whose car is the
symbol `guide' and whose cdr is that window.
next prev parent reply other threads:[~2012-12-02 3:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-01 22:57 basic help evaluating function in an alist Matt Price
2012-12-01 23:12 ` Drew Adams
2012-12-02 2:40 ` Matt Price
2012-12-02 3:44 ` Drew Adams [this message]
2012-12-04 14:41 ` Matt Price
[not found] <mailman.14266.1354402640.855.help-gnu-emacs@gnu.org>
2012-12-01 23:12 ` WJ
2012-12-02 1:06 ` WJ
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B5A7126D12854BFF89F76BDE5D6B1A4C@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=moptop99@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.