Function: message-cite-original-1
message-cite-original-1 is a byte-compiled function defined in
message.el.gz.
Signature
(message-cite-original-1 STRIP-SIGNATURE)
Documentation
Cite an original message.
If STRIP-SIGNATURE is non-nil, strips off the signature from the original message.
This function uses mail-citation-hook if that is non-nil.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-cite-original-1 (strip-signature)
"Cite an original message.
If STRIP-SIGNATURE is non-nil, strips off the signature from the
original message.
This function uses `mail-citation-hook' if that is non-nil."
(if (and (boundp 'mail-citation-hook)
mail-citation-hook)
(run-hooks 'mail-citation-hook)
(let* ((start (point))
(end (mark t))
(x-no-archive nil)
(functions
(when message-indent-citation-function
(if (listp message-indent-citation-function)
message-indent-citation-function
(list message-indent-citation-function))))
;; This function may be called by `gnus-summary-yank-message' and
;; may insert a different article from the original. So, we will
;; modify the value of `message-reply-headers' with that article.
(message-reply-headers
(save-restriction
(narrow-to-region start end)
(message-narrow-to-head-1)
(setq x-no-archive (message-fetch-field "x-no-archive"))
(make-full-mail-header
0
(or (message-fetch-field "subject") "none")
(or (message-fetch-field "from") "nobody")
(message-fetch-field "date")
(message-fetch-field "message-id" t)
(message-fetch-field "references")
0 0 ""))))
(mml-quote-region start end)
(when strip-signature
;; Allow undoing.
(undo-boundary)
(goto-char end)
(when (re-search-backward message-signature-separator start t)
;; Also peel off any blank lines before the signature.
(forward-line -1)
(while (looking-at "^[ \t]*$")
(forward-line -1))
(forward-line 1)
(delete-region (point) end)
(unless (search-backward "\n\n" start t)
;; Insert a blank line if it is peeled off.
(insert "\n"))))
(goto-char start)
(mapc #'funcall functions)
(when message-citation-line-function
(unless (bolp)
(insert "\n"))
(funcall message-citation-line-function))
(when (and x-no-archive
(not message-cite-articles-with-x-no-archive)
(string-match "yes" x-no-archive))
(undo-boundary)
(delete-region (point) (mark t))
(insert "> [Quoted text removed due to X-No-Archive]\n")
(push-mark)
(forward-line -1)))))