Function: message-make-in-reply-to

message-make-in-reply-to is a byte-compiled function defined in message.el.gz.

Signature

(message-make-in-reply-to)

Documentation

Return the In-Reply-To header for this message.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-make-in-reply-to ()
  "Return the In-Reply-To header for this message."
  (when message-reply-headers
    (let ((from (mail-header-from message-reply-headers))
          (date (mail-header-date message-reply-headers))
          (msg-id (mail-header-id message-reply-headers)))
      (when from
        (let ((name (mail-extract-address-components from)))
          (concat
           msg-id
           (when message-header-use-obsolete-in-reply-to
             (concat
              (if msg-id " (")
              (if (car name)
                  (if (string-match "[^[:ascii:]]" (car name))
                      ;; Quote a string containing non-ASCII characters.
                      ;; It will make the RFC2047 encoder cause an error
                      ;; if there are special characters.
                      (mm-with-multibyte-buffer
                        (insert (car name))
                        (goto-char (point-min))
                        (while (search-forward "\"" nil t)
                          (when (prog2
                                    (backward-char)
                                    (evenp (skip-chars-backward "\\\\"))
                                  (goto-char (match-beginning 0)))
                            (insert "\\"))
                          (forward-char))
                        ;; Those quotes will be removed by the RFC2047 encoder.
                        (concat "\"" (buffer-string) "\""))
                    (car name))
                (nth 1 name))
              "'s message of \""
              (if (or (not date) (string= date ""))
                  "(unknown date)" date)
              "\"" (if msg-id ")")))))))))