emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug with S-Tab in keymaps


From: Alan Mackenzie
Subject: Re: Bug with S-Tab in keymaps
Date: Mon, 5 May 2008 20:54:11 +0000
User-agent: Mutt/1.5.9i

Hi, Stefan!

On Mon, May 05, 2008 at 02:07:53PM -0400, Stefan Monnier wrote:
> > Should S-Tab be stored in a keymap as a symbol or a number?  Or are both
> > valid?  Which is the canonical form?  Where should the conversion from
> > the uncanonical form to the canonical be done?

> IIUC the canonical name of shift-tab in Emacs is `backtab'.
> The conversion from various other terminal-specific representations
> should be done in function-key-map.  If it's not done there, please
> report it as a bug.

That's what I thought I was doing.  I think the bug is that a symbol,
here 'S-tab, is being used when there's a perfectly good ASCII char +
bucky bit available.

I also think the canonical form of a key sequence should be defined in
the Elisp manual.  (Yes, I know, I'm implicitly volunteering to do
this.)

Icicles actually uses the symbol 'S-tab.  So, potentially, does a fair
bit of other software.

My own opinion, for what it's worth, is that read_key_sequence (in
keyboard.c) and lookup-key (in keymap.c) should both massage the
differences between #x2000009 and 'S-tab and 'S-TAB, somehow.  I suppose
even #x4000049 (&I + the control bucky bit) for the same thing is
conceivable.  Maybe `define-key' should canonicalise the key-sequences
it's given before writing them into a keymap.

In fact, `canonicalise-key-sequence' would be easy to write in Lisp, and
could be called from all of read_key_sequence, lookup-key and
define-key.  What do you think?

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

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