unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: lee <lee@yun.yagibdah.de>
To: help-gnu-emacs@gnu.org
Subject: Re: confusion with defining keys
Date: Thu, 12 Jun 2014 07:40:39 +0200	[thread overview]
Message-ID: <87ha3q1y94.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <jwvmwdjekfx.fsf-monnier+gmane.emacs.help@gnu.org> (Stefan Monnier's message of "Wed, 11 Jun 2014 07:53:27 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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	other threads:[~2014-06-12  5:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11  5:05 confusion with defining keys lee
2014-06-11  8:21 ` kastian
2014-06-11 11:30 ` Nicolas Richard
2014-06-12  5:28   ` lee
2014-06-11 11:53 ` Stefan Monnier
2014-06-12  5:40   ` lee [this message]
     [not found] ` <mailman.3403.1402487643.1147.help-gnu-emacs@gnu.org>
2014-06-11 14:32   ` Emanuel Berg
2014-06-12  0:56     ` Stefan Monnier
     [not found]     ` <mailman.3459.1402534627.1147.help-gnu-emacs@gnu.org>
2014-06-12  1:39       ` Emanuel Berg
2014-06-12  1:49         ` Emanuel Berg
2014-06-12  2:48         ` Stefan Monnier
     [not found]         ` <mailman.3470.1402541342.1147.help-gnu-emacs@gnu.org>
2014-06-12 13:59           ` Emanuel Berg
2014-06-12 14:17           ` Emanuel Berg
2014-06-12 14:52             ` Stefan Monnier
     [not found]             ` <mailman.3498.1402584764.1147.help-gnu-emacs@gnu.org>
2014-06-12 22:57               ` Emanuel Berg

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=87ha3q1y94.fsf@yun.yagibdah.de \
    --to=lee@yun.yagibdah.de \
    --cc=help-gnu-emacs@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).