[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12535: 24.2.50; [PATCH] `edmacro-parse-keys' is incorrect for M-<TAB
From: |
Drew Adams |
Subject: |
bug#12535: 24.2.50; [PATCH] `edmacro-parse-keys' is incorrect for M-<TAB> |
Date: |
Wed, 14 Oct 2020 10:22:13 -0700 (PDT) |
> > > > If so, that's incorrect - the bug is still present.
> > >
> > > Btw, I'm not sure I agree with the proposed fix: <TAB> and TAB are
> > > different keys.
> >
> > Yes, but then why wouldn't we also consider <ESC> and
> > ESC to be different keys?
>
> Because they aren't.
>
> TAB is the ASCII character Ctrl-I, whereas <TAB> is the _function_ key
> Tab. Modern keyboards can produce both, and Emacs maps the latter to
> the former. But there's no function key Esc on the keyboard.
>
> > Likewise, all the others in the same clause:
> >
> > "\\<\\(NUL\\|RET\\|LFD\\|ESC\\|SPC\\|DEL\\)$"
>
> We do have the same situation with DEL vs <Delete> and <Backspace>.
> But not with the others you mention.
>
> > Why, for all of those, does Emacs consider <WORD> and
> > WORD to be the same key, where WORD is any of those
> > ASCII control-char names (NUL, RET, LFD, ESC, SPC, DEL),
> > but it doesn't consider <TAB> and TAB to be the same key.
>
> You are missing the point: the brackets is not some syntactic sugar,
> it is an indication of a function key, like <F1> and <DOWN>.
That's the point - why are we interpreting <TAB> as a
function key, as if TAB were as unknown as foobar, which
we handle as (unknown) function key <foobar>? Why aren't
we interpreting TAB the same way we interpret ESC, RET,
and SPC, that is, interpreting <TAB> the same way we
interpret <ESC>, <RET>, and <SPC>?
You say Tab is a function key (you wrote it like that), at
least on some keyboards. So is tab apparently, which Emacs
writes as <tab>. And which is (naturally, good) not
considered the same (function) key as <TAB>. But your Tab
function key is written <TAB>?
Are you sure there are no keyboards, or there won't be any,
that have a function key named Esc or ESC, Ret or RET, Del
or DEL, etc.?
My keyboard has a key labeled "Esc", but presumably it
sends an ASCII ESC code. I understand that my keyboard
key labeled doesn't send an ASCII TAB code, but Emacs
calls it <tab>, not <TAB>.
Something seems pretty arbitrary, here... Hysterical
raisins or real logic? Why is TAB the odd man out?