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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 28 Aug 2025 17:22:05 +0300

> From: Linn Stanton <[email-masked]>
> Date: Thu, 28 Aug 2025 09:47:22 -0400
> Cc: Linn Stanton <[email-masked]>,
>  [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?