diff options
| author | David Bremner <david@tethera.net> | 2015-01-14 20:57:49 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2015-01-16 09:07:09 +0100 |
| commit | 2bbe5e034db4d982a754e481e7a59a0a4d886e44 (patch) | |
| tree | 06330180b513f0c3e39f568e17bd3d6aadd23c1a | |
| parent | 9060a1f61771a5d4a320e04223a077d1b5c075ea (diff) | |
emacs: make citation function customizable.
Make a new customizable variable instead of relying on
message-cite-function because the default for the latter changed
between emacs releases.
The defcustom is borrowed from the message.el source, with minor
modifications.
| -rw-r--r-- | emacs/notmuch-mua.el | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 2c588860..33f13998 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -75,6 +75,22 @@ list." :type '(repeat string) :group 'notmuch-send) +(defgroup notmuch-reply nil + "Replying to messages in notmuch" + :group 'notmuch) + +(defcustom notmuch-mua-cite-function 'message-cite-original + "*Function for citing an original message. +Predefined functions include `message-cite-original' and +`message-cite-original-without-signature'. +Note that these functions use `mail-citation-hook' if that is non-nil." + :type '(radio (function-item message-cite-original) + (function-item message-cite-original-without-signature) + (function-item sc-cite-original) + (function :tag "Other")) + :link '(custom-manual "(message)Insertion Variables") + :group 'notmuch-reply) + ;; (defun notmuch-mua-get-switch-function () @@ -220,8 +236,9 @@ list." (date (plist-get original-headers :Date)) (start (point))) - ;; message-cite-original constructs a citation line based on the From and Date - ;; headers of the original message, which are assumed to be in the buffer. + ;; notmuch-mua-cite-function constructs a citation line based + ;; on the From and Date headers of the original message, which + ;; are assumed to be in the buffer. (insert "From: " from "\n") (insert "Date: " date "\n\n") @@ -233,7 +250,7 @@ list." (set-mark (point)) (goto-char start) ;; Quote the original message according to the user's configured style. - (message-cite-original))) + (funcall notmuch-mua-cite-function))) ;; Crypto processing based crypto content of the original message (when process-crypto |
