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

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

Re: Binding C-x C-RET ?


From: David Kastrup
Subject: Re: Binding C-x C-RET ?
Date: Wed, 17 May 2006 17:54:44 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Bastien <bastien@xxx.fr> writes:

> How do you bind C-x C-<RET> to a function ?
>
> (global-set-key "\C-x\C-\\r" 'execute-extended-command) 
>
> binds the function to C-x C-\ r with is not what i expected...

Well, \\ is a backslash.  You'd better write "\C-x\C-\r".  However,
this is not legal, as \C-\r is not a proper character and thus can't
be part of a string.  But you could write

(global-set-key (kbd "C-x C-RET") 'execute-extended-command)

instead.  This will only work in a window system, not on a tty, of
course, since C-RET still is not a proper character.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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