Function: mail-sent-via

mail-sent-via is an interactive and byte-compiled function defined in sendmail.el.gz.

This command is obsolete since 24.1; nobody can remember what it is for.

Signature

(mail-sent-via)

Documentation

Make a Sent-via header line from each To or Cc header line.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mail/sendmail.el.gz
(defun mail-sent-via ()
  "Make a Sent-via header line from each To or Cc header line."
  (declare (obsolete "nobody can remember what it is for." "24.1"))
  (interactive)
  (save-excursion
    ;; put a marker at the end of the header
    (let ((end (copy-marker (mail-header-end)))
	  (case-fold-search t))
      (goto-char (point-min))
      ;; search for the To: lines and make Sent-via: lines from them
      ;; search for the next To: line
      (while (re-search-forward "^\\(to\\|cc\\):" end t)
	;; Grab this line plus all its continuations, sans the `to:'.
	(let ((to-line
	       (buffer-substring (point)
				 (progn
				   (if (re-search-forward "^[^ \t\n]" end t)
				       (backward-char 1)
				     (goto-char end))
				   (point)))))
	  ;; Insert a copy, with altered header field name.
	  (insert-before-markers "Sent-via:" to-line))))))