emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: query-replace in isearch (was Re: should search ring contain duplica


From: Juri Linkov
Subject: Re: query-replace in isearch (was Re: should search ring contain duplicates?)
Date: Fri, 12 May 2006 14:14:46 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

>     The following patch should do that.  It also uses `add-to-history'
>     to add the current search string to `query-replace-from-history-variable'
>     to improve code in the same function.  This requires adding a new
>     argument KEEP-ALL to `add-to-history'.
>
> Why do you think it requires that?

The old code unconditionally adds a new element to the history list as:

!     (set query-replace-from-history-variable
!          (cons isearch-string
!                (symbol-value query-replace-from-history-variable)))

A new argument KEEP-ALL allows to do the same for the new code that uses
`add-to-history':

!     (add-to-history query-replace-from-history-variable isearch-string nil t)

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]