[Top][All Lists]

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

Re: Looking for the "best" notation for key-binding

From: Peter Dyballa
Subject: Re: Looking for the "best" notation for key-binding
Date: Fri, 21 Sep 2012 22:37:40 +0200

Am 21.09.2012 um 18:29 schrieb Stefan Monnier:

>>>> I think the vector notation is a good choice:
>>>> (global-set-key [C-∫]              'backward-sexp) ; A-C-b
>>> This likely won't work.  You need
>>> (global-set-key [?\C-∫] 'backward-sexp) ; A-C-b
>>> instead.  Yes, it's an annoyance.  You have to understand the
>>> distinction between keys that emit characters and other keys (that emit
>>> symbols).
>> Yes, it stopped working.
> When did it work?

I think it was in GNU Emacs 22 based "Carbon Emacs".

>> So ∫ is a symbol just as © or Ω?
> AFAIK they're all characters (my use of `symbol' was in the Lisp sense
> of symbol as opposed to integer, string, cons, float, ...).
>> What makes the distinction?
> The code that turns GUI events into Lisp events, mostly.  The general
> rule is that keys which should self-insert get turned into
> character-events, while other (special) keys get turned into symbol-events.

∫ is a self-insert command:

        ∫ runs the command self-insert-command, which is an interactive
        built-in function in `C source code'.
        It is bound to many ordinary text characters.



The wise man said: "Never argue with an idiot. They bring you down to their 
level and beat you with experience."

reply via email to

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