X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fmessage.el;h=934a4a72bebac026a27be84791e72afe822000b8;hp=00e3c3ddb8f1bae3373a5c05066b425b1234cf2c;hb=4fc7ec6583b0050c03754944e2dcf9e47968d665;hpb=b7979bcee9f84eb8b51ff6bf3139296350feb7a4 diff --git a/lisp/message.el b/lisp/message.el index 00e3c3ddb..934a4a72b 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1007,6 +1007,9 @@ The first matched address (not primary one) is used in the From field." (User-Agent)) "Alist used for formatting headers.") +(defvar message-options nil + "Some saved answers when sending message.") + (eval-and-compile (autoload 'message-setup-toolbar "messagexmas") (autoload 'mh-new-draft-name "mh-comp") @@ -2124,7 +2127,8 @@ It should typically alter the sending method in some way or other." (message message-sending-message) (let ((alist message-send-method-alist) (success t) - elem sent) + elem sent + (message-options message-options)) (while (and success (setq elem (pop alist))) (when (funcall (cadr elem)) @@ -4560,6 +4564,19 @@ regexp varstr." (goto-char (point-max)) (insert "From: " email "\n")))) +(defun message-options-get (symbol) + (cdr (assq symbol message-options))) + +(defun message-options-set (symbol value) + (let ((the-cons (assq symbol message-options))) + (if the-cons + (if value + (setcdr the-cons value) + (setq message-options (delq the-cons message-options))) + (and value + (push (cons symbol value) message-options)))) + value) + (provide 'message) (run-hooks 'message-load-hook)