emacs-devel
[Top][All Lists]
Advanced

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

Re: editor for large xml files?


From: Tassilo Horn
Subject: Re: editor for large xml files?
Date: Wed, 17 Feb 2010 10:20:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Andreas Roehler <address@hidden> writes:

Hi Andreas,

> As this style
>
> (global-set-key [(control kp-divide)] 'My-Command)
>
> or
>
> (global-set-key [(control x)(c)] 'My-Other-Command)
>
> is understood by all Emacsen, suggest to keep that, declaring the
> other ones obsolete.

Was there any discussion of declaring it obsolete?

IMO, the recommended style for making keybindings should be `kbd', which
is available in Emacs, XEmacs, and SXEmacs.

So your 2 definitions would become:

  (global-set-key (kbd "<C-kp-divide>") 'My-Command)
  (global-set-key (kbd "C-x c")         'My-Other-Command)

That's quite easy to read and write (you can simply insert the string
describe-key outputs as argument to `kbd'), and it hides how an
implementation represents the key sequences internally.

Bye,
Tassilo




reply via email to

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