X-Debbugs-CC: Stefan Monnier Tags: patch >> query-replace-map needs to be translated to another keymap >> where the same characters from 'query-replace-map' >> run real commands, not intermediate symbols. > > E.g. > > (defvar foo-remapping-map > (let ((map (make-sparse-keymap))) > (define-key map [remap ask] '...) > ... > map)) > > and then > > ... (make-composed-keymap query-replace-map foo-remapping-map) .. This also required adding the same feature that supported recentering/scrolling in y-or-n-p to the minibuffer as well. A large part of old implementation of y-or-n-p handled recentering/scrolling. Now the minibuffer supports the same commands by using the new macro 'with-minibuffer-selected-window'. window.c was changed to use the 'lambda' value for MINIBUF arg of 'next-window', so minibuffer-scroll-other-window/minibuffer-scroll-other-window-down doesn't try to scroll the minibuffer window. A new history variable 'y-or-n-p-history-variable' is nil by default, so no history is used in 'y-or-n-p' minibuffer. This patch was tested with various commands that use 'y-or-n-p' and seems to work fine: