Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 472D54196F0 for ; Mon, 26 Apr 2010 02:25:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bQkY9pzERZDN for ; Mon, 26 Apr 2010 02:25:31 -0700 (PDT) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by olra.theworths.org (Postfix) with ESMTP id 3C9CF4196F2 for ; Mon, 26 Apr 2010 02:25:30 -0700 (PDT) Received: by wyj26 with SMTP id 26so556223wyj.26 for ; Mon, 26 Apr 2010 02:25:29 -0700 (PDT) Received: by 10.216.88.143 with SMTP id a15mr2671406wef.6.1272273928798; Mon, 26 Apr 2010 02:25:28 -0700 (PDT) Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com [83.217.165.81]) by mx.google.com with ESMTPS id t70sm839423weq.2.2010.04.26.02.25.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 02:25:28 -0700 (PDT) Received: by ut.hh.sledj.net (Postfix, from userid 1000) id 0672C59413D; Mon, 26 Apr 2010 10:25:37 +0100 (BST) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH 3/3] emacs: Add a search to the 'recent searches' list once only Date: Mon, 26 Apr 2010 10:25:30 +0100 Message-Id: <1272273930-30997-3-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.0 In-Reply-To: <87iq7i2aia.fsf@yoom.home.cworth.org> References: <87iq7i2aia.fsf@yoom.home.cworth.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2010 09:25:32 -0000 Avoiding adding the same search string to the 'recent searches' list more than once by testing whether the string was already used with `member' rather than `memq'. --- emacs/notmuch-hello.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 52f162a..30b3a5e 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -77,7 +77,7 @@ field." (defvar notmuch-hello-recent-searches nil) (defun notmuch-hello-remember-search (search) - (if (not (memq search notmuch-hello-recent-searches)) + (if (not (member search notmuch-hello-recent-searches)) (push search notmuch-hello-recent-searches)) (if (> (length notmuch-hello-recent-searches) notmuch-hello-recent-searches-max) -- 1.7.0