]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Add a search to the 'recent searches' list once only
authorDavid Edmondson <dme@dme.org>
Mon, 26 Apr 2010 09:25:30 +0000 (10:25 +0100)
committerCarl Worth <cworth@cworth.org>
Mon, 26 Apr 2010 14:31:26 +0000 (07:31 -0700)
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

index 52f162a4fcb3c4dcca277d941fabcad9c9f9eca1..30b3a5e0ffdf50f5baeceba7f43d3645b945634b 100644 (file)
@@ -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)