X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-hello.el;h=333d4c1ea633749cabb7dcf0e31f78241b1eadd2;hb=a74ec0edd65f46eca097fd7784aaaef88801267e;hp=2f7e17dc0aed79bd6c614768cd35bfcd57ef2fd8;hpb=7edf9e2765d2795ca85dd2c239af20a7493e2085;p=notmuch diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 2f7e17dc..333d4c1e 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -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))))