diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2020-11-16 22:28:37 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-12-06 16:22:07 -0400 |
| commit | dff7f06711dba1c2d6a84d3e76021da0bf606623 (patch) | |
| tree | b8dc86d7f7318c2588fb1007a98f8baf54969eb9 /emacs/notmuch-lib.el | |
| parent | 4f57e018431eefadda0157db05c7d84ead1bb1ae (diff) | |
emacs: inline notmuch-split-content-type
This trivial helper function actually made things slightly
*less* readable by adding an unnecessary indirection.
Diffstat (limited to 'emacs/notmuch-lib.el')
| -rw-r--r-- | emacs/notmuch-lib.el | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 61107e38..2c8de328 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -534,14 +534,10 @@ This replaces spaces, percents, and double quotes in STR with (setq pred (cddr pred))) (cdr xplist))) -(defun notmuch-split-content-type (content-type) - "Split content/type into 'content' and 'type'." - (split-string content-type "/")) - (defun notmuch-match-content-type (t1 t2) "Return t if t1 and t2 are matching content types, taking wildcards into account." - (let ((st1 (notmuch-split-content-type t1)) - (st2 (notmuch-split-content-type t2))) + (let ((st1 (split-string t1 "/")) + (st2 (split-string t2 "/"))) (if (or (string= (cadr st1) "*") (string= (cadr st2) "*")) ;; Comparison of content types should be case insensitive. |
