]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-hello.el
emacs: remove redundant notmuch-hello-trim
[notmuch] / emacs / notmuch-hello.el
index bb60a890f85e1a1e8680363f136d15761b4c728e..b67a5e1993aabdf775604c11fe8374b890dd651c 100644 (file)
@@ -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))