emacs-devel
[Top][All Lists]
Advanced

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

Re: should search ring contain duplicates?


From: Kim F. Storm
Subject: Re: should search ring contain duplicates?
Date: Thu, 11 May 2006 12:08:14 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Juri Linkov <address@hidden> writes:

>>>> Below is a tested patch that removes `keep-all' from 
>>>> `read-from-minibuffer',
>>
>> Did you test that with your changes, it still fixes the original problem
>> which was the reason for the original change?
>>
>> http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00287.html
>
> I tested it with all test cases from this thread, but that was before
> adding add-to-history to CVS.
>
>> But pls. consider using add-to-history instead of explicitly testing
>> for history-delete-duplicates.
>
> To use add-to-history there should be a way to tell read-from-minibuffer
> not to add new elements to the history list, so add-to-history could
> undertake this task itself later.  nil as the `hist' argument of
> read-from-minibuffer doesn't count because the history list should be
> available for M-p.
>
>> BTW, add-to-history should probably be fixed to _not_ add an element
>> which is already at the head of the history.
>
> Then it becomes a complete duplicate of C code.  

The intention of add-to-history is to provide the same functionality as
the C code -- so that Lisp code can be sure to DTRT when they add 
stuff to a history list "manually".

>                                                  Isn't then better
> to call the Lisp function add-to-history from the C implementation of
> read_minibuf?

I have no opinion here.

Another approach would be to implement add-to-history in C (it's
practically already there), and export it to Lisp.

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





reply via email to

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