all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Miles Bader <miles@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	Drew Adams <drew.adams@oracle.com>,
	emacs-devel@gnu.org
Subject: Re: Bug with S-Tab in keymaps
Date: Wed, 7 May 2008 08:24:52 +0000	[thread overview]
Message-ID: <20080507082452.GA2497@muc.de> (raw)
In-Reply-To: <87d4nzdo1m.fsf@catnip.gol.com>

'Morning, Miles!

On Wed, May 07, 2008 at 08:13:09AM +0900, Miles Bader wrote:
> Alan Mackenzie <acm@muc.de> writes:
> > here's an embryonic `canonicalize-event' (note the American spelling
> > ;-).  It works, e.g. for

> Why all the mucking about with symbols?!  [E.g. 'C-M-u ]

My main point is that there should BE a standard way of representing key
sequences.  At the moment there is not.  So that if I type <shift>-<tab>
on my keyboard, function-key-map turns this into #x2000009.  `lookup-key'
then fails to find the binding on the symbol 'S-tab in a keymap.  This is
a bug.

Whether the standard I tentatively proposed is the right one or not can
be debated.  I'd appreciate people agreeing with me that a standard is
wanted.

> Why not use a representation that actually works with emacs like
> '(control meta u)?

What do you mean?  Symbols actually work with Emacs very well.

For the specific instance you give, I actually proposed a number:
#x8000015 = ?\C-u + the meta bit.

But I still think 'C-M-up is superior to '(control meta up).  It takes
less space, and (eq sym 'C-M-up) is faster than (equal sym '(control meta
up)).  Also, events are represented as symbols at the moment, so why
change this to a list?

Of course, if the speed of looking up keys were a problem (it's not) we
could use an obarray.

The mucking about with symbols in my `canonicalize-event' only needs to
be twice per event per key lookup (and when the binding is made, of
course).  

> Thanks,

> -Miles

-- 
Alan Mackenzie (Nuremberg, Germany).




  reply	other threads:[~2008-05-07  8:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05 14:11 Bug with S-Tab in keymaps Alan Mackenzie
2008-05-05 18:07 ` Stefan Monnier
2008-05-05 20:40   ` Drew Adams
2008-05-06  0:46     ` Stefan Monnier
2008-05-05 20:54   ` Alan Mackenzie
2008-05-05 20:46     ` Lennart Borgman (gmail)
2008-05-05 21:00       ` Drew Adams
2008-05-06 21:26     ` Alan Mackenzie
2008-05-06 23:13       ` Miles Bader
2008-05-07  8:24         ` Alan Mackenzie [this message]
2008-05-07 15:17           ` Stefan Monnier
2008-05-06 17:08 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080507082452.GA2497@muc.de \
    --to=acm@muc.de \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.