Function: message-forward-subject-name-subject

message-forward-subject-name-subject is a byte-compiled function defined in message.el.gz.

Signature

(message-forward-subject-name-subject SUBJECT)

Documentation

Generate a SUBJECT for a forwarded message.

The form is: [Source] Subject, where if the original message was mail, Source is the name of the sender, and if the original message was news, Source is the list of newsgroups is was posted to.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-forward-subject-name-subject (subject)
  "Generate a SUBJECT for a forwarded message.
The form is: [Source] Subject, where if the original message was mail,
Source is the name of the sender, and if the original message was
news, Source is the list of newsgroups is was posted to."
  (let* ((group (message-fetch-field "newsgroups"))
	 (from (message-fetch-field "from"))
	 (prefix
	  (or group
	      (or (and from (or
			     (car (gnus-extract-address-components from))
			     (cadr (gnus-extract-address-components from))))
		  "(nowhere)"))))
    (concat "["
	    (if message-forward-decoded-p
		prefix
	      (mail-decode-encoded-word-string prefix))
	    "] " subject)))