]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-hello.el
lib: fix messages.c build warn
[notmuch] / emacs / notmuch-hello.el
index 2f7e17dc0aed79bd6c614768cd35bfcd57ef2fd8..333d4c1ea633749cabb7dcf0e31f78241b1eadd2 100644 (file)
@@ -157,8 +157,9 @@ International Bureau of Weights and Measures."
 (defvar notmuch-hello-recent-searches nil)
 
 (defun notmuch-hello-remember-search (search)
-  (if (not (member search notmuch-hello-recent-searches))
-      (push search notmuch-hello-recent-searches))
+  (setq notmuch-hello-recent-searches
+       (delete search notmuch-hello-recent-searches))
+  (push search notmuch-hello-recent-searches)
   (if (> (length notmuch-hello-recent-searches)
         notmuch-recent-searches-max)
       (setq notmuch-hello-recent-searches (butlast notmuch-hello-recent-searches))))