* improvements in the :mailing-list field

This commit is contained in:
djcb
2012-12-26 13:01:36 +02:00
parent e387311c72
commit 382ccc2e2e
3 changed files with 10 additions and 8 deletions

View File

@ -482,9 +482,11 @@ that has a live window), and vice versa."
(dolist (cell mu4e-user-mailing-lists) (puthash (car cell) (cdr cell) mu4e~lists-hash)))
(or
(gethash list-id mu4e~lists-hash)
;; if it's not in the db, take the part until the first dot.
(when (string-match "\\([^.]*\\)\\." list-id)
(match-string 1 list-id))))
;; if it's not in the db, take the part until the first dot if there is one;
;; otherwise just return the whole thing
(if (string-match "\\([^.]*\\)\\." list-id)
(match-string 1 list-id)
list-id)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;