Function: mh-extract-from-attribution

mh-extract-from-attribution is a byte-compiled function defined in mh-letter.el.gz.

Signature

(mh-extract-from-attribution)

Documentation

Extract phrase or comment from From header field.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-letter.el.gz
(defun mh-extract-from-attribution ()
  "Extract phrase or comment from From header field."
  (save-excursion
    (if (not (mh-goto-header-field "From: "))
        nil
      (skip-chars-forward " ")
      (cond
       ((looking-at "\"\\([^\"\n]+\\)\" \\(<.+>\\)")
        (format "%s %s " (match-string 1)(match-string 2)))
       ((looking-at "\\([^<\n]+<.+>\\)$")
        (format "%s " (match-string 1)))
       ((looking-at "\\([^ ]+@[^ ]+\\) +(\\(.+\\))$")
        (format "%s <%s> " (match-string 2)(match-string 1)))
       ((looking-at " *\\(.+\\)$")
        (format "%s " (match-string 1)))))))