GNU bug report logs -
#69342
query-replace: ignore events not binded in query-replace-map
Previous Next
Full log
Message #17 received at 69342 <at> debbugs.gnu.org (full text, mbox):
> I suppose this feature will be available starting from Emacs version 30,
> right?
Yes, not before the next release.
> In the meantime, I was suggested this code on StackExchange
> (https://emacs.stackexchange.com/a/80494/15606):
>
> (defvar my-do-nothing-map
> (let ((map (make-keymap)))
> (set-char-table-range (nth 1 map) t 'ignore)
> map))
>
> (set-keymap-parent query-replace-map my-do-nothing-map)
>
> and it seems to work with the actual version of query-replace.
Interesting hack.
> @@ -3111,7 +3111,7 @@ perform-replace
> ;; 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
Still this could be fixed as well. Only one thing that I don't understand
is why lookup-key ignores bindings for [t] by default. This requires adding
ACCEPT-DEFAULT=t to all calls. But ok, this can't be changed now.
This bug report was last modified 1 year and 136 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.