help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: confusion with defining keys


From: lee
Subject: Re: confusion with defining keys
Date: Thu, 12 Jun 2014 07:40:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> (global-set-key "\C-ä" 'undo)
>
> This should ideally signal an error, because "\C-ä" is an invalid string
> (a string can only contains chars and C-ä is not a char but
> a "char combined with a modifier").  For historical reasons this doesn't
> signal an error, but it doesn't do what you want.  Use either (kbd
> "C-ä") or [?\C-ä].
> In general, I recommend never to use the plain "..." notation for key
> sequences: it made sense back in the Emacs-18 days when it was
> introduced, but it's been a "legacy" since Emacs-19.

Hm, I think I tried (kbd "<C-ä>"), which didn't work.  How is one
supposed to know what to use?  I'd never think of [?\C-ä] ...


-- 
Knowledge is volatile and fluid.  Software is power.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]