aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/gnus/message.el58
1 files changed, 22 insertions, 36 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 7cf5019ec50..540736c0e57 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -5945,41 +5945,27 @@ See `message-idna-encode'."
5945 (message-idna-to-ascii-rhs-1 "Mail-Followup-To") 5945 (message-idna-to-ascii-rhs-1 "Mail-Followup-To")
5946 (message-idna-to-ascii-rhs-1 "Cc"))))) 5946 (message-idna-to-ascii-rhs-1 "Cc")))))
5947 5947
5948(defvar Date)
5949(defvar Message-ID)
5950(defvar Organization)
5951(defvar From)
5952(defvar Path)
5953(defvar Subject)
5954(defvar Newsgroups)
5955(defvar In-Reply-To)
5956(defvar References)
5957(defvar To)
5958(defvar Distribution)
5959(defvar Lines)
5960(defvar User-Agent)
5961(defvar Expires)
5962
5963(defun message-generate-headers (headers) 5948(defun message-generate-headers (headers)
5964 "Prepare article HEADERS. 5949 "Prepare article HEADERS.
5965Headers already prepared in the buffer are not modified." 5950Headers already prepared in the buffer are not modified."
5966 (setq headers (append headers message-required-headers)) 5951 (setq headers (append headers message-required-headers))
5967 (save-restriction 5952 (save-restriction
5968 (message-narrow-to-headers) 5953 (message-narrow-to-headers)
5969 (let* ((Date (message-make-date)) 5954 (let* ((header-values
5970 (Message-ID (message-make-message-id)) 5955 (list 'Date (message-make-date)
5971 (Organization (message-make-organization)) 5956 'Message-ID (message-make-message-id)
5972 (From (message-make-from)) 5957 'Organization (message-make-organization)
5973 (Path (message-make-path)) 5958 'From (message-make-from)
5974 (Subject nil) 5959 'Path (message-make-path)
5975 (Newsgroups nil) 5960 'Subject nil
5976 (In-Reply-To (message-make-in-reply-to)) 5961 'Newsgroups nil
5977 (References (message-make-references)) 5962 'In-Reply-To (message-make-in-reply-to)
5978 (To nil) 5963 'References (message-make-references)
5979 (Distribution (message-make-distribution)) 5964 'To nil
5980 (Lines (message-make-lines)) 5965 'Distribution (message-make-distribution)
5981 (User-Agent message-newsreader) 5966 'Lines (message-make-lines)
5982 (Expires (message-make-expires)) 5967 'User-Agent message-newsreader
5968 'Expires (message-make-expires)))
5983 (case-fold-search t) 5969 (case-fold-search t)
5984 (optionalp nil) 5970 (optionalp nil)
5985 header value elem header-string) 5971 header value elem header-string)
@@ -6033,8 +6019,8 @@ Headers already prepared in the buffer are not modified."
6033 (setq header (cdr elem)) 6019 (setq header (cdr elem))
6034 (or (and (functionp (cdr elem)) 6020 (or (and (functionp (cdr elem))
6035 (funcall (cdr elem))) 6021 (funcall (cdr elem)))
6036 (and (boundp (cdr elem)) 6022 (and (symbolp (cdr elem))
6037 (symbol-value (cdr elem))))) 6023 (plist-get header-values (cdr elem)))))
6038 ((consp elem) 6024 ((consp elem)
6039 ;; The element is a cons. Either the cdr is a 6025 ;; The element is a cons. Either the cdr is a
6040 ;; string to be inserted verbatim, or it is a 6026 ;; string to be inserted verbatim, or it is a
@@ -6044,11 +6030,11 @@ Headers already prepared in the buffer are not modified."
6044 (cdr elem)) 6030 (cdr elem))
6045 (and (functionp (cdr elem)) 6031 (and (functionp (cdr elem))
6046 (funcall (cdr elem))))) 6032 (funcall (cdr elem)))))
6047 ((and (boundp header) 6033 ((and (symbolp header)
6048 (symbol-value header)) 6034 (plist-member header-values header))
6049 ;; The element is a symbol. We insert the value 6035 ;; The element is a symbol. We insert the value of
6050 ;; of this symbol, if any. 6036 ;; this symbol, if any.
6051 (symbol-value header)) 6037 (plist-get header-values header))
6052 ((not (message-check-element 6038 ((not (message-check-element
6053 (intern (downcase (symbol-name header))))) 6039 (intern (downcase (symbol-name header)))))
6054 ;; We couldn't generate a value for this header, 6040 ;; We couldn't generate a value for this header,