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: Kim F. Storm
Subject: Re: query-replace in isearch (was Re: should search ring contain duplicates?)
Date: Sun, 14 May 2006 01:13:50 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     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)
>
> If I understand right, add-to-history unconditionally adds a new last
> element.  Not so?
>
> It also deletes older elements that match the new one.  

Only if history-delete-duplicates is non-nil ... but it is nil by default.

>                                                         Using
> add-to-history will treat this new element just like other new
> elements on the same history list.  That seems right to me.  Do you
> think it is wrong in this case?

It is wrong if history-delete-duplicates is nil; then it unconditionally
adds an element even if it is equal to the head of the history.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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