emacs: Add a search to the 'recent searches' list once only

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'.
This commit is contained in:
David Edmondson 2010-04-26 10:25:30 +01:00 committed by Carl Worth
parent d6dea89588
commit a9bf967e71

View 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)