From: David Edmondson Date: Mon, 26 Apr 2010 09:25:30 +0000 (+0100) Subject: emacs: Add a search to the 'recent searches' list once only X-Git-Tag: 0.3~62 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=a9bf967e71cca6eb220063ee50b94a7601bc2b96;p=obsolete%2Fnotmuch-old 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'. --- diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 52f162a4..30b3a5e0 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)