unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: Binding C-x C-RET ?
Date: Wed, 17 May 2006 17:54:44 +0200	[thread overview]
Message-ID: <85psicpry3.fsf@lola.goethe.zz> (raw)
In-Reply-To: 874pzo67ar.fsf@tallis.ilo.ucl.ac.uk

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	other threads:[~2006-05-17 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 14:43 Binding C-x C-RET ? Bastien
2006-05-17 15:54 ` David Kastrup [this message]
2006-05-17 15:11   ` Bastien
2006-05-17 16:15     ` David Kastrup
2006-05-17 15:38       ` Bastien

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85psicpry3.fsf@lola.goethe.zz \
    --to=dak@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).