From 0e542f0f71a71b57378ee6789185bd19a37cf912 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sat, 2 Mar 2024 19:22:30 +0200 Subject: [PATCH] * lisp/replace.el (perform-replace): Accept default bindings in lookup-key. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Set ACCEPT-DEFAULT arg of lookup-key to t (bug#69342). This will allow the users to ignore unbound keys with ‘(define-key query-replace-map [t] 'ignore)’. (cherry picked from commit ebab7276139888266ae0f27bd3b2874e2ed8c077) --- lisp/replace.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index 61a1cc7714c..0b4b7cb915f 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2918,7 +2918,7 @@ characters." ;; If last typed key in previous call of multi-buffer perform-replace ;; was `automatic-all', don't ask more questions in next files - (when (eq (lookup-key map (vector last-input-event)) 'automatic-all) + (when (eq (lookup-key map (vector last-input-event) t) 'automatic-all) (setq query-flag nil multi-buffer t)) (cond @@ -3102,7 +3102,7 @@ characters." ;; read-event that clobbers the match data. (set-match-data real-match-data) (setq key (vector key)) - (setq def (lookup-key map key)) + (setq def (lookup-key map key t)) ;; Restore the match data while we process the command. (cond ((eq def 'help) (let ((display-buffer-overriding-action -- 2.39.5