From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: should search ring contain duplicates? Date: Thu, 04 May 2006 23:55:28 +0200 Message-ID: References: <200605030727.k437R2Wx009975@amrm2.ics.uci.edu> <87bqufwbls.fsf@jurta.org> <85iromw09n.fsf@lola.goethe.zz> <36938.128.165.123.132.1146758757.squirrel@webmail.lanl.gov> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146779859 25253 80.91.229.2 (4 May 2006 21:57:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 May 2006 21:57:39 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 04 23:57:36 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 1FblpD-0002i9-Dk for ged-emacs-devel@m.gmane.org; Thu, 04 May 2006 23:57:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FblpD-0006Ku-1F for ged-emacs-devel@m.gmane.org; Thu, 04 May 2006 17:57:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fblp1-0006Jv-5r for emacs-devel@gnu.org; Thu, 04 May 2006 17:57:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fblox-0006J6-As for emacs-devel@gnu.org; Thu, 04 May 2006 17:57:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fblox-0006J3-6j for emacs-devel@gnu.org; Thu, 04 May 2006 17:57:15 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fblow-0004BT-AM; Thu, 04 May 2006 17:57:14 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id 2B958FAC027; Thu, 4 May 2006 23:57:10 +0200 (CEST) Original-To: herring@lanl.gov In-Reply-To: <36938.128.165.123.132.1146758757.squirrel@webmail.lanl.gov> (Stuart D. Herring's message of "Thu, 4 May 2006 09:05:57 -0700 (PDT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:53934 Archived-At: "Stuart D. Herring" writes: > (defun isearch-update-ring (string &optional regexp) > "Add STRING to the beginning of the search ring. > REGEXP says which ring to use." > (history-push string > (if regexp 'regexp-search-ring 'search-ring) > (if regexp regexp-search-ring-max search-ring-max))) What a piece of art! Thanks! It shows exactly why add-to-history is the rigth way to go. And fixes the bug in isearch-update-ring too ! -- Kim F. Storm http://www.cua.dk