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

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

Re: [h-e-w] key-binding


From: David Vanderschel
Subject: Re: [h-e-w] key-binding
Date: 07 Nov 2001 22:49:16 -0600

On Wednesday, November 07, "Stephen Leake" <address@hidden> wrote:

>"Daniel Hegyi" <address@hidden> writes:
>> In my .emacs I have:
>> (global-set-key "\C-%" 'match-paren)

>> My match-paren function, however, gets bound to C-e. How can I
>> correctly bind it to C-%?

>It's probably bound to C-e in a local keymap.  ...

No, that is not the problem.  The syntax "\C-%" does
not work correctly for this keystroke (and results in
the binding of C-e for me too).  Either of the
following work correctly:

(global-set-key [?\C-%] 'match-paren)
(global-set-key [(control %)] 'match-paren)

(I am not sure about this, but I think the problem is
that you just cannot represent that shift-combination
as a character in a string.  The square bracket syntax
is more robust because it deals more nearly at the
level of what keys are actually pressed.)

Regards,
  David V.




reply via email to

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