mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
emacs: remove redundant notmuch-hello-trim
Use `string-trim', which exists since Emacs 24.4.
This commit is contained in:
parent
05a436f730
commit
8d701cdc99
1 changed files with 1 additions and 7 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue