Function: sc-get-address

sc-get-address is a byte-compiled function defined in supercite.el.gz.

Signature

(sc-get-address FROM AUTHOR)

Documentation

Get the full email address path from FROM.

AUTHOR is the author's name (which is removed from the address).

Source Code

;; Defined in /usr/src/emacs/lisp/mail/supercite.el.gz
(defun sc-get-address (from author)
  "Get the full email address path from FROM.
AUTHOR is the author's name (which is removed from the address)."
  (let ((eos (length from)))
    (if (string-match (concat "\\`\"?" (regexp-quote author)
			      "\"?\\s +") from 0)
	(let ((address (substring from (match-end 0) eos)))
	  (if (and (= (aref address 0) ?<)
		   (= (aref address (1- (length address))) ?>))
	      (substring address 1 (1- (length address)))
	    address))
      (if (string-match "[-[:alnum:]!@%._]+" from 0)
	  (match-string 0 from)
	""))))