X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-mua.el;h=32e2e30bfd938d96a37ad6014768810006e0e737;hb=3f9d73884ee7c26797a1528b89e1fe63aadc3271;hp=274c5dabc61030d593eeb80d29d1eaf253b500b9;hpb=dacaaf3a07034ace8ba42be97dbc3141883e9823;p=notmuch diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 274c5dab..32e2e30b 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -35,10 +35,12 @@ "Function used to generate a `User-Agent:' string. If this is `nil' then no `User-Agent:' will be generated." :group 'notmuch - :type 'function - :options '(notmuch-mua-user-agent-full - notmuch-mua-user-agent-notmuch - notmuch-mua-user-agent-emacs)) + :type '(choice (const :tag "No user agent string" nil) + (const :tag "Full" notmuch-mua-user-agent-full) + (const :tag "Notmuch" notmuch-mua-user-agent-notmuch) + (const :tag "Emacs" notmuch-mua-user-agent-emacs) + (function :tag "Custom user agent function" + :value notmuch-mua-user-agent-full))) (defcustom notmuch-mua-hidden-headers '("^User-Agent:") "Headers that are added to the `message-mode' hidden headers @@ -65,7 +67,7 @@ list." (defun notmuch-mua-add-more-hidden-headers () "Add some headers to the list that are hidden by default." (mapc (lambda (header) - (when (not (member header 'message-hidden-headers)) + (when (not (member header message-hidden-headers)) (push header message-hidden-headers))) notmuch-mua-hidden-headers)) @@ -106,7 +108,8 @@ list." (if (re-search-backward message-signature-separator nil t) (forward-line -1) (goto-char (point-max))) - (insert body)) + (insert body) + (push-mark)) (set-buffer-modified-p nil) (message-goto-body)) @@ -124,9 +127,10 @@ list." (message-goto-to)) -(defun notmuch-mua-mail (&optional to subject other-headers continue - switch-function yank-action send-actions) - "Invoke the notmuch mail composition window." +(defun notmuch-mua-mail (&optional to subject other-headers &rest other-args) + "Invoke the notmuch mail composition window. + +OTHER-ARGS are passed through to `message-mail'." (interactive) (when notmuch-mua-user-agent-function @@ -138,8 +142,7 @@ list." (push (cons "From" (concat (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers)) - (message-mail to subject other-headers continue - switch-function yank-action send-actions) + (apply #'message-mail to subject other-headers other-args) (message-sort-headers) (message-hide-headers) (set-buffer-modified-p nil)