Function: sc-guess-attribution

sc-guess-attribution is a byte-compiled function defined in supercite.el.gz.

Signature

(sc-guess-attribution &optional STRING)

Documentation

Guess attribution string on current line.

If attribution cannot be guessed, nil is returned. Optional STRING if supplied, is used instead of the line point is on in the current buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/supercite.el.gz
(defun sc-guess-attribution (&optional string)
  "Guess attribution string on current line.
If attribution cannot be guessed, nil is returned.  Optional STRING if
supplied, is used instead of the line point is on in the current buffer."
  (let ((start 0)
	(string (or string (buffer-substring (line-beginning-position)
					     (line-end-position))))
	attribution)
    (and
     (= start (or (string-match sc-citation-leader-regexp string start) -1))
     (setq start (match-end 0))
     (= start (or (string-match sc-citation-root-regexp string start) 1))
     (setq attribution (match-string 0 string)
	   start (match-end 0))
     (= start (or (string-match sc-citation-delimiter-regexp string start) -1))
     (setq start (match-end 0))
     (= start (or (string-match sc-citation-separator-regexp string start) -1))
     attribution)))