From 8d701cdc997a1310efb2b6e08b95d705da9062e6 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Mon, 16 Nov 2020 22:28:21 +0100 Subject: [PATCH] emacs: remove redundant notmuch-hello-trim Use `string-trim', which exists since Emacs 24.4. --- emacs/notmuch-hello.el | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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)) -- 2.43.0