X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmessage.el;h=716091031672b7bc387c674263c1a7425e8d72af;hb=244ef187d7e8e84547e0c3239287e1aefc61e908;hp=d8927ebc59cbe1c9ed092667966266110762b347;hpb=8cbf0038db13f0d2541f885b37fa6e19c6ce90b5;p=gnus diff --git a/lisp/message.el b/lisp/message.el index d8927ebc5..716091031 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -310,7 +310,7 @@ any confusion." ;;; Start of variables adopted from `message-utils.el'. -(defcustom message-subject-trailing-was-query 'ask +(defcustom message-subject-trailing-was-query t "*What to do with trailing \"(was: )\" in subject lines. If nil, leave the subject unchanged. If it is the symbol `ask', query the user what do do. In this case, the subject is matched against @@ -318,7 +318,7 @@ the user what do do. In this case, the subject is matched against `message-subject-trailing-was-query' is t, always strip the trailing old subject. In this case, `message-subject-trailing-was-regexp' is used." - :version "22.1" + :version "24.1" :type '(choice (const :tag "never" nil) (const :tag "always strip" t) (const ask)) @@ -1183,13 +1183,17 @@ It is a vector of the following headers: :error "All header lines must be newline terminated") (defcustom message-default-headers "" - "*A string containing header lines to be inserted in outgoing messages. -It is inserted before you edit the message, so you can edit or delete -these lines." + "Header lines to be inserted in outgoing messages. +This can be set to a string containing or a function returning +header lines to be inserted before you edit the message, so you +can edit or delete these lines. If set to a function, it is +called and its result is inserted." :version "23.2" :group 'message-headers :link '(custom-manual "(message)Message Headers") - :type 'message-header-lines) + :type '(choice + (message-header-lines :tag "String") + (function :tag "Function"))) (defcustom message-default-mail-headers ;; Ease the transition from mail-mode to message-mode. See bugs#4431, 5555. @@ -2683,7 +2687,6 @@ PGG manual, depending on the value of `mml2015-use'." (define-key message-mode-map "\C-a" 'message-beginning-of-line) (define-key message-mode-map "\t" 'message-tab) - (define-key message-mode-map "\M-;" 'comment-region) (define-key message-mode-map "\M-n" 'message-display-abbrev)) @@ -6407,7 +6410,10 @@ are not included." headers) (delete-region (point) (progn (forward-line -1) (point))) (when message-default-headers - (insert message-default-headers) + (insert + (if (functionp message-default-headers) + (funcall message-default-headers) + message-default-headers)) (or (bolp) (insert ?\n))) (insert mail-header-separator "\n") (forward-line -1)