From: David Kastrup <dak@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Get a command by its keybinding and also respecting key translation
Date: Mon, 20 Dec 2010 11:35:31 +0100 [thread overview]
Message-ID: <8739psn34c.fsf@lola.goethe.zz> (raw)
In-Reply-To: 87lj3kd9vn.fsf@member.fsf.org
Tassilo Horn <tassilo@member.fsf.org> writes:
> Andreas Schwab <schwab@linux-m68k.org> writes:
>
> Hi Andreas,
>
>>> Or with an example:
>>>
>>> (defmacro define-context-key (keymap key dispatch)
>>> `(define-key ,keymap ,key
>>> (backquote
>>> (menu-item "context-key" ignore
>>> :filter (lambda (&optional ignored)
>>> ,dispatch)))))
>>>
>>> How do I smuggle a `,' before the lambda?
>>
>> First, backquote != `.
>
> It is not? From backquote.el:
>
> (defalias '\` (symbol-function 'backquote))
>
> And describe-function returns the same (except the name) for both ``'
> and `backquote'.
You are confusing \` with `. ` is (obviously) treated specially by the
Lisp reader and converted into a form involving the macro \`. At some
point in the past, this rather used the macro backquote instead. If
this were still so, you probably would be less confused. The connection
between ` and \` is arbitrary, and established by the Lisp reader.
M-: '`(+ 4 ,soup)
gives
(\` (+ 4 (\, soup)))
--
David Kastrup
next prev parent reply other threads:[~2010-12-20 10:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-13 18:57 Get a command by its keybinding and also respecting key translation Tassilo Horn
2010-12-14 19:50 ` Stefan Monnier
2010-12-14 22:51 ` Tassilo Horn
2010-12-18 16:16 ` Stefan Monnier
2010-12-20 8:19 ` Tassilo Horn
2010-12-20 10:09 ` Andreas Schwab
2010-12-20 10:19 ` Tassilo Horn
2010-12-20 10:35 ` David Kastrup [this message]
2010-12-20 11:10 ` Tassilo Horn
2010-12-20 11:30 ` Andreas Schwab
2010-12-15 8:21 ` Tassilo Horn
2010-12-15 15:27 ` Tassilo Horn
2010-12-15 15:30 ` Davis Herring
2010-12-15 21:20 ` Tassilo Horn
2010-12-15 22:03 ` Get a command by its keybinding and also respecting keytranslation Drew Adams
2010-12-15 22:17 ` Tassilo Horn
2010-12-15 22:39 ` Drew Adams
2010-12-18 16:27 ` Stefan Monnier
2010-12-18 16:23 ` Get a command by its keybinding and also respecting key translation Stefan Monnier
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=8739psn34c.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=emacs-devel@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 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.