From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: should search ring contain duplicates? Date: Sun, 14 May 2006 19:29:59 -0400 Message-ID: References: <200605030727.k437R2Wx009975@amrm2.ics.uci.edu> <87bqufwbls.fsf@jurta.org> <8764kezswj.fsf@jurta.org> <87ejz1mqvg.fsf@jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1147656850 2234 80.91.229.2 (15 May 2006 01:34:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 May 2006 01:34:10 +0000 (UTC) Cc: dann@ics.uci.edu, emacs-devel@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 15 03:34:05 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FfRyC-0002cQ-Lb for ged-emacs-devel@m.gmane.org; Mon, 15 May 2006 03:34:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfRyC-000490-6h for ged-emacs-devel@m.gmane.org; Sun, 14 May 2006 21:34:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfRy0-00047P-Ex for emacs-devel@gnu.org; Sun, 14 May 2006 21:33:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfRy0-00046h-3g for emacs-devel@gnu.org; Sun, 14 May 2006 21:33:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfRxz-00046Y-QU for emacs-devel@gnu.org; Sun, 14 May 2006 21:33:47 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FfQ4g-0000qv-LX for emacs-devel@gnu.org; Sun, 14 May 2006 19:32:34 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1FfQ2B-0002gs-LI; Sun, 14 May 2006 19:30:00 -0400 Original-To: Juri Linkov In-reply-to: <87ejz1mqvg.fsf@jurta.org> (message from Juri Linkov on Thu, 11 May 2006 01:55:47 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54470 Archived-At: > 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?