[Top][All Lists]

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

Re: ESC vs Meta for shifted keys

From: Robert Pluim
Subject: Re: ESC vs Meta for shifted keys
Date: Thu, 12 Apr 2018 16:57:41 +0200

Drew Adams <address@hidden> writes:

>> >> I think it's just a bug: when left-word and right-word were introduced
>> >> only one pair of bindings was updated and not the other.
>> >
>> > I'm not sure it's a bug.  My guess is that it was by design
>> > (for whatever reason).  Perhaps Eli or someone else can
>> > enlighten us.
>> >
>> > I kinda doubt it was an oversight.  All of those bindings
>> > are together, and the person who changed the Meta bindings
>> > likely searched for `forward-word', not "[M-right]" or
>> > "(kbd "M-<right>")"...
>> >
>> > In `bindings.el':
>> >  (global-set-key [M-right]  'right-word)
>> >  (define-key esc-map [right] 'forward-word)
>> >  (global-set-key [M-left]   'left-word)
>> >  (define-key esc-map [left] 'backward-word)
>> They both used to be bound to {forward,backward}-word, and were
>> updated at the same time. They're only different in R2L text.
> The question raised was whether the apparent
> non-update of the esc-map bindings was deliberate
> or an oversight.

It looks deliberate to me (and sensible).

> When you say "they" were bound ... and "they" were
> updated at the same time, is it the same "they"?
> Does "they" refer to the global and esc-map keys
> for the update, as well as for the old bindings?
> Are you saying that the esc-map bindings used to
> be bound to (forward|backward)-*, and they were
> "updated" (at the same time as the global-map
> keys) to the same keys: (forward|backward)-*?

Only the global bindings were changed:

--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1103,9 +1103,9 @@ mode-specific-map
   "Keymap for characters following C-c.")
 (define-key global-map "\C-c" 'mode-specific-command-prefix)
-(global-set-key [M-right]  'forward-word)
+(global-set-key [M-right]  'right-word)
 (define-key esc-map [right] 'forward-word)
-(global-set-key [M-left]   'backward-word)
+(global-set-key [M-left]   'left-word)
 (define-key esc-map [left] 'backward-word)
 ;; address@hidden says these bindings are standard on PC editors.
 (global-set-key [C-right]  'right-word)

reply via email to

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