1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-26 07:29:17 +02:00

* mu4e: cosmetics

This commit is contained in:
djcb 2012-09-28 17:10:34 +03:00
parent 8b5664fcfc
commit c7bb9aef9a
3 changed files with 26 additions and 27 deletions

View File

@ -56,13 +56,12 @@ the From: address.)"
(defcustom mu4e-sent-messages-behavior 'sent (defcustom mu4e-sent-messages-behavior 'sent
"Determines what mu4e does with sent messages - this is a symbol "Determines what mu4e does with sent messages - this is a symbol
which can be either: which can be either: 'sent --> move the sent message to the
'sent --> move the sent message to the Sent-folder (`mu4e-sent-folder') Sent-folder (`mu4e-sent-folder') 'trash --> move the sent message
'trash --> move the sent message to the Trash-folder (`mu4e-trash-folder') to the Trash-folder (`mu4e-trash-folder') 'delete --> delete the
'delete --> delete the sent message. sent message. Note, when using GMail/IMAP, you should set this to
Note, when using GMail/IMAP, you should set this to either 'trash either 'trash or 'delete, since GMail already takes care of keeping
or 'delete, since GMail already takes care of keeping copies in the copies in the sent folder."
sent folder."
:type 'symbol :type 'symbol
:safe 'symbolp :safe 'symbolp
:group 'mu4e-compose) :group 'mu4e-compose)

View File

@ -521,10 +521,7 @@ This is used by the completion function in mu4e-compose."
(and mu4e-compose-complete-ignore-address-regexp (and mu4e-compose-complete-ignore-address-regexp
(string-match mu4e-compose-complete-ignore-address-regexp mail)) (string-match mu4e-compose-complete-ignore-address-regexp mail))
(add-to-list 'lst (add-to-list 'lst
(if name (format "\"%s\" <%s>" (if name (format "\"%s\" <%s>" name mail) mail))))))
;; hack so we don't get ',' in e-mail addresses...
(replace-regexp-in-string "," "" name)
mail) mail))))))
(setq mu4e~contacts-for-completion lst) (setq mu4e~contacts-for-completion lst)
(mu4e-message "Contacts received: %d" (mu4e-message "Contacts received: %d"
(length mu4e~contacts-for-completion)))) (length mu4e~contacts-for-completion))))

View File

@ -336,7 +336,8 @@ at POINT, or if nil, at (point)."
(let* ((parts (mu4e-message-field msg :parts)) (let* ((parts (mu4e-message-field msg :parts))
(verdicts (verdicts
(remove-if 'null (remove-if 'null
(mapcar (lambda (part) (mu4e-message-part-field part :signature)) parts))) (mapcar (lambda (part) (mu4e-message-part-field part :signature))
parts)))
(val (when verdicts (val (when verdicts
(mapconcat (mapconcat
(lambda (v) (lambda (v)
@ -382,7 +383,8 @@ at POINT, or if nil, at (point)."
(remove-if-not (remove-if-not
(lambda (part) (lambda (part)
(let ((mtype (mu4e-message-part-field part :mime-type)) (let ((mtype (mu4e-message-part-field part :mime-type))
(isattach (member 'attachment (mu4e-message-part-field part :type)))) (isattach (member 'attachment
(mu4e-message-part-field part :type))))
(or ;; remove if it's not an attach *or* if it's an (or ;; remove if it's not an attach *or* if it's an
;; image/audio/application type (but not a signature) ;; image/audio/application type (but not a signature)
isattach isattach
@ -1087,11 +1089,12 @@ user that unmarking only works in the header list."
(defmacro mu4e~view-defun-mark-for (mark) (defmacro mu4e~view-defun-mark-for (mark)
"Define a function mu4e-view-mark-for-MARK." "Define a function mu4e-view-mark-for-MARK."
(let ((funcname (intern (concat "mu4e-view-mark-for-" (symbol-name mark)))) (let ((funcname (intern (concat "mu4e-view-mark-for-" (symbol-name mark))))
(docstring (concat "Mark the current message for " (symbol-name mark) "."))) (docstring (format "Mark the current message for %s."
(symbol-name mark))))
`(defun ,funcname () ,docstring `(defun ,funcname () ,docstring
(interactive) (interactive)
(mu4e~view-in-headers-context (mu4e~view-in-headers-context
(mu4e-headers-mark-and-next (quote mark)))))) (mu4e-headers-mark-and-next (quote ,mark))))))
;; would be cool to do something like the following, but somehow, I can't get ;; would be cool to do something like the following, but somehow, I can't get
;; the quoting right... ;; the quoting right...