[PATCH 3/3] emacs: Add a search to the 'recent searches' list once only

Subject: [PATCH 3/3] emacs: Add a search to the 'recent searches' list once only

Date: Mon, 26 Apr 2010 10:25:30 +0100

To: notmuch@notmuchmail.org

Cc:

From: David Edmondson


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


Thread: