>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)arsdigita.com> writes:
> XEmacs switched to using overriding-local-map (presumable to
> sync with FSF).
Hrvoje> No. Isearch uses the overriding local map because it
Hrvoje> wants to take precedence over extent-local keymaps.
Hmm, OK, that's a good reason.
Hrvoje> I wouldn't do this because some parts of isearch might
Hrvoje> depend on overriding-local-map being used.
Hrvoje> Why not do this:
Hrvoje> (set-keymap-parent folding-isearch-mode-map overriding-local-map)
Hrvoje> (setq overriding-local-map folding-isearch-mode-map)
Thanks for the feedback. I tried this. Entering isearch, then
entering folds works fine. What breaks is exiting isearch (by
pressing Enter, C-a, C-g, etc.). It sort of gets out of isearch, so
you can move around the buffer and such, but then when you press a key
bound to self-insert command, you end up back in the original isearch.
So, say you did "C-s g n u Enter", move around the buffer, then press
"s", and you see isearch prompt saying "gnus."
My guess is that this is related to the following function which wraps
around everything in when doing isearch in folding mode.
;; The HEART! Executes command and updates the foldings.
;; This is capable of detecting a `quit'.
(defun folding-isearch-general (function)
...
(cond
((memq function '(isearch-abort isearch-quit))
(setq quit-isearch t))
(t
...
(funcall function)
...
(if quit-isearch
(signal 'quit nil))))
So, Enter is bound to isearch-exit would follow somewhat different
code path than isearch-abort ("C-g"), but both end up having the same
problem. There is some kind of cleanup which is not happening. I
just could not figure out what it was.
I even tried sticking in (isearch-done) for "C-g" (which should set
overriding-local-map to nil), but I kept having the same problem.
(if quit-isearch
+ (isearch-done)
(signal 'quit nil))))
Gleb