diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2020-11-16 22:28:21 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-12-06 16:17:24 -0400 |
| commit | 8d701cdc997a1310efb2b6e08b95d705da9062e6 (patch) | |
| tree | 617e3b504f7e879bad665cd45284bbbb448d1ba6 /emacs | |
| parent | 05a436f730cf6277c403b445bca9419ea89a7b2d (diff) | |
emacs: remove redundant notmuch-hello-trim
Use `string-trim', which exists since Emacs 24.4.
Diffstat (limited to 'emacs')
| -rw-r--r-- | emacs/notmuch-hello.el | 8 |
1 files changed, 1 insertions, 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)) |
