Subject: bug#79323: 30.2; Control-X-prefix not remapable

From: Linn Stanton <[email-masked]>
Date: Thu, 28 Aug 2025 10:53:27 -0400

As an update, I am attaching my current .emacs.  Interestingly, it does not set C-x for the entire session, but if I eval-region on the overriding-local-map chunk, then it takes. Is the overriding-local-map so local that it won’t work in .emacs?
￼

L i n n   S t a n t o n
[email-masked]  
(917) 208-8246

In any moment of decision, the best thing you can do is the right thing, the next best thing is the wrong thing, and the worst thing you can do is nothing.

Theodore Roosevelt <http://www.brainyquote.com/quotes/authors/t/theodore_roosevelt.html>

> On Aug 28, 2025, at 10:35 AM, Linn Stanton <[email-masked]> wrote:
> 
> I am attaching my entire .emacs, but it does seem odd
> 
> In the current 30.2, with just the code fragment, it seems the C-] assignment has to go into overriding-local-map
> 
> <.emacs copy>
> 
> L i n n   S t a n t o n
> [email-masked]  
> (917) 208-8246
> 
> 
> Do what you can, with what you have, where you are.
> 
> Theodore Roosevelt <http://www.brainyquote.com/quotes/authors/t/theodore_roosevelt.html>
> 
> 
> 
> 
>> On Aug 28, 2025, at 10:22 AM, Eli Zaretskii <[email-masked]> wrote:
>> 
>>> From: Linn Stanton <[email-masked] <mailto:[email-masked]>>
>>> Date: Thu, 28 Aug 2025 09:47:22 -0400
>>> Cc: Linn Stanton <[email-masked] <mailto:[email-masked]>>,
>>> [email-masked] <mailto:[email-masked]>
>>> 
>>> Here is the relevant portion of my .emacs:
>>> 
>>> (make-local-variable 'overriding-local-map)
>>> (setq overriding-local-map (copy-keymap global-map))
>>> (define-key global-map [(control ?\])] 'Control-X-prefix)
>>> (global-set-key [(control x)] 'next-line)
>>> (define-key global-map [(control x)] 'next-line)
>>> (define-key overriding-local-map [(control x)] 'next-line)
>>> (define-key minibuffer-local-map  [(control e)] 'previous-history-element)
>>> (define-key minibuffer-local-map  [(control x)] 'next-history-element)
>>> (define-key minibuffer-local-completion-map [(control e)] 'previous-history-element)
>>> (define-key minibuffer-local-completion-map [(control x)] 'next-history-element)
>>> (define-key minibuffer-local-isearch-map [(control e)] 'previous-history-element)
>>> 
>>> Up until recently, this let me remap C-x to next-line, with all the standard C-x functionality moving to C-], but
>>> in the current version while the C-] mapping still works, C-x is still interpreted as a prefix
>> 
>> I cannot quite reproduce this, so maybe something is missing from the
>> above recipe.
>> 
>> If I start "emacs -Q" and then evaluate this:
>> 
>>  (make-local-variable 'overriding-local-map)
>>  (setq overriding-local-map (copy-keymap global-map))
>>  (define-key global-map [(control ?\])] 'Control-X-prefix)
>>  (global-set-key [(control x)] 'next-line)
>>  (define-key global-map [(control x)] 'next-line)
>>  (define-key overriding-local-map [(control x)] 'next-line)
>> 
>> then C-x becomes bound to next-line both in Emacs 29 and in Emacs 30.
>> C-] doesn't get bound to C-x prefix, but that doesn't happen in Emacs
>> 29, either.
>> 
>> Stefan, did we change anything in Emacs 30 that should affect the
>> above?
>