GNU bug report logs - #14742
24.3.50; enhancement request: be able to prepend stuff from buffer when search backward

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 28 Jun 2013 18:19:01 UTC

Severity: wishlist

Found in version 24.3.50

Full log


Message #50 received at 14742 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Juri Linkov <juri <at> jurta.org>
Cc: 14742 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#14742: 24.3.50;
 enhancement request: be able to prepend stuff from buffer when search
 backward
Date: Fri, 05 Jul 2013 18:59:16 -0400
> +	  ;; 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>))


        Stefan




This bug report was last modified 4 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.