GNU bug report logs -
#15233
pp-eval-expression: Signature parity with `eval-expression'
Previous Next
Full log
Message #23 received at 15233 <at> debbugs.gnu.org (full text, mbox):
I prefer to use the `kbd' notation, e.g.
(global-set-key (kbd "M-:") 'pp-eval-expression)
because it's clear, regular, and doesn't require me to remember
that keys are internally represented as vectors, how to quote
modifiers, etc. If I'm not sure of the canonical representation of
something (e.g. "M-H-x or H-M-x?") I can easily check visually
with C-h c, or something like this to kill the correct form for me
(this quick version performs key translations, which isn't optimal):
(defun describe-key-name (key)
(interactive "kGenerate and kill `kbd' form for key: ")
(kill-new
(message "(kbd \"%s\")"
(help-key-description key nil))))
Josh
On Mon, Sep 2, 2013 at 7:20 PM, Jambunathan K <kjambunathan <at> gmail.com> wrote:
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
>>> (global-set-key "\272" (quote pp-eval-expression)) ; M-:
>>
>> Please don't:
>
> Don't blame me, I didn't do it, Emacs did it.
>
> I have a simple recipe for producing keybindings.
>
> M-x global-set-key
> M-x list-command-history
> Copy and Paste
>
> The above recipe works flawlessly. It is the most easiest way to
> produce keybindings that I have known.
>
>
>
This bug report was last modified 11 years and 247 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.