X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-hello.el;h=333d4c1ea633749cabb7dcf0e31f78241b1eadd2;hb=49af79cd2a3be66e482039f1ef05cf909144230e;hp=2f7e17dc0aed79bd6c614768cd35bfcd57ef2fd8;hpb=9a0b61da56ede4d0ff79a064d92d8c1a16cf636b;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))))