X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-hello.el;h=b67a5e1993aabdf775604c11fe8374b890dd651c;hb=8d701cdc997a1310efb2b6e08b95d705da9062e6;hp=bb60a890f85e1a1e8680363f136d15761b4c728e;hpb=88ae4f02511c4dd61ea90b28794f469819d543be;p=notmuch diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index bb60a890..b67a5e19 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -387,15 +387,9 @@ afterwards.") (format "%s%03d" notmuch-hello-thousands-separator elem)) (cdr result))))) -(defun notmuch-hello-trim (search) - "Trim whitespace." - (if (string-match "^[[:space:]]*\\(.*[^[:space:]]\\)[[:space:]]*$" search) - (match-string 1 search) - search)) - (defun notmuch-hello-search (&optional search) (unless (null search) - (setq search (notmuch-hello-trim search)) + (setq search (string-trim search)) (let ((history-delete-duplicates t)) (add-to-history 'notmuch-search-history search))) (notmuch-search search notmuch-search-oldest-first))