mu4e: remove mu4e~compose-browse-url-mail

Instead, rely on the common browse-url-mail, which does the right thing
after
  (setq mail-user-agent 'mu4e-user-agent)
This commit is contained in:
djcb
2017-04-08 15:21:06 +03:00
parent 895a78ba7b
commit 98b998b86d
3 changed files with 17 additions and 24 deletions

View File

@ -821,26 +821,9 @@ draft message."
;; returning the symbol is probably the correct thing to do, as other
;; such functions suggest.
(defun mu4e-user-agent ()
"Return the `mu4e-user-agent' symbol."
'mu4e-user-agent)
(defun mu4e~compose-browse-url-mail (url &optional ignored)
"Adapter for `browse-url-mailto-function."
(let* ((headers (rfc2368-parse-mailto-url url))
(to (cdr (assoc "To" headers)))
(cc (assoc "Cc" headers))
(subject (cdr (assoc "Subject" headers)))
(body (cdr (assoc "Body" headers))))
(mu4e~compose-mail to subject (delq nil `(,cc)))
(if body
(progn
(message-goto-body)
(insert body)
(if (not to)
(message-goto-to)
(if (not subject)
(message-goto-subject)
(message-goto-body)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun mu4e-compose-goto-top ()