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: Richard Stallman
Subject: Re: should search ring contain duplicates?
Date: Sun, 14 May 2006 19:29:59 -0400

    > 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.  Isn't then better
    to call the Lisp function add-to-history from the C implementation of
    read_minibuf?

Looking at the code of add-to-history, it appears to me that it
already behaves as requested here.  If the new element matches the
head of the history list, add-to-history does not add another copy.

More precisely, it does not preserve the old head.
Instead it deletes that and then adds a new element.
But the result is, all the same, to have just one, not two.
This is all that matters, as far as I can see.

Is there a real issue here?




reply via email to

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