GNU bug report logs -
#14742
24.3.50; enhancement request: be able to prepend stuff from buffer when search backward
Previous Next
Full log
Message #53 received at 14742 <at> debbugs.gnu.org (full text, mbox):
>> + ;; Handle a motion function.
>> + ((and isearch-allow-move
>> + (progn (setq key (isearch-reread-key-sequence-naturally keylist))
>> + (setq keylist (listify-key-sequence key))
>> + (setq main-event (aref key 0))
>> + (setq move-command (or
>> + (isearch-lookup-move-key key)
>> + (isearch-lookup-move-key
>> + ;; Use the last key in the sequence.
>> + (vector (aref key (1- (length key)))))))))
>> + (setq prefix-arg arg)
>> + (let ((new-point (save-excursion
>> + (condition-case ()
>> + (command-execute move-command)
>> + (error nil))
>> + (point))))
>> + ;; An alternative to move without yanking is (goto-char new-point)
>> + (isearch-yank-or-del (point) new-point))
>> + (unless (eq (car-safe isearch-allow-move) 'only)
>> + (setq isearch-allow-move (cons 'only isearch-allow-move))))
>
> Hmm... that still adds a crap load of code in this already too-long function.
> Can't we bring it down to something like
>
> + ((isearch-handle-motion-function <blabla>))
This code is mostly a copy of code that implements the `isearch-allow-scroll'
feature. If it's necessary to refactor the whole `isearch-other-meta-char'
then code for `isearch-allow-scroll' should be moved to a separate
function like `isearch-handle-scroll-function' too.
But still I don't understand how this would be possible to handle
outside of `isearch-other-meta-char', because this code changes the
local variables `key', `keylist', `main-event', `move-command'
locally bound in `isearch-other-meta-char'.
This bug report was last modified 4 years and 267 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.