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: Emanuel Berg
Subject: Re: confusion with defining keys
Date: Thu, 12 Jun 2014 03:49:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <address@hidden> writes:

> Check out the below experimentation:
>
> (global-set-key (kbd "RET") 'newline-and-indent) ;
> works (global-set-key "\r" 'newline-and-indent) ; works
> (global-set-key [RET] 'newline-and-indent) ; (error "To
> bind the key RET, use \"\\r\", not [RET]")
>
> (global-set-key (kbd "M-SPC") 'eat-space) ; works
> (global-set-key "\M- " 'eat-space) ; works
> (global-set-key [M-SPC] 'eat-space) ; (error "To bind
> the key M-SPC, use \"\\M- \", not [M-SPC]")

TAB also behaves like that (should be "\t") as well as
different combinations, e.g., "\M-\r" instead of
[M-R**] (but (kbd "M-RET") is fine).

-- 
underground experts united:
http://user.it.uu.se/~embe8573


reply via email to

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