[Top][All Lists]

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

Re: Evaluating (global-set-key "\C-<" 'ding) in emacs buffer leads to a

From: Stefan Monnier
Subject: Re: Evaluating (global-set-key "\C-<" 'ding) in emacs buffer leads to a error invalid modifier in string
Date: Mon, 30 Jul 2007 10:55:03 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> the subject says it all, contact me for more info if needed be.

I see no problem here: C-< is not a character, so it can't be placed inside
a string.  Some control sequences are characters for historical reasons
(they correspond to ASCII chars 0-31), but most aren't.  I recommend to stay
away from strings and use arrays when specifying key sequences:

    (global-set-key [?\C-<] 'ding)
    (global-set-key [(control <)] 'ding)

-- Stefan

reply via email to

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