GNU bug report logs -
#14742
24.3.50; enhancement request: be able to prepend stuff from buffer when search backward
Previous Next
Full log
View this message in rfc822 format
> @@ -2379,7 +2616,67 @@ (defun isearch-other-meta-char (&optiona
> (if ab-bel
> (isearch-back-into-window (eq ab-bel 'above) isearch-point)
> (goto-char isearch-point)))
> (isearch-update))
> + ;; 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* ((old-point (point))
> + (new-point (save-excursion
> + (condition-case ()
> + (command-execute move-command)
> + (error nil))
> + (point))))
> + ;; Change search direction between forward and backward.
> + (when (if isearch-forward
> + (< new-point old-point)
> + (> new-point old-point))
> + (setq isearch-forward (not isearch-forward))
> + (setq isearch-string "" isearch-message "")
> + (if isearch-other-end (setq old-point isearch-other-end)))
> + (if (< old-point new-point)
> + (if isearch-forward
> + (isearch-yank-string
> + (buffer-substring-no-properties old-point new-point))
> + (isearch-del-char (- new-point old-point) t))
> + (if isearch-forward
> + (isearch-del-char (- old-point new-point))
> + (isearch-yank-string
> + (buffer-substring-no-properties old-point new-point) t))))
> + (setq isearch-allow-move (cons 'only isearch-allow-move)))
> ;; A mouse click on the isearch message starts editing the search string
> ((and (eq (car-safe main-event) 'down-mouse-1)
> (window-minibuffer-p (posn-window (event-start main-event))))
Could you move this new code to a separate function?
Stefan
This bug report was last modified 4 years and 266 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.