Function: sc-guess-nesting

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

Signature

(sc-guess-nesting &optional STRING)

Documentation

Guess the citation nesting on the current line.

If nesting 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-nesting (&optional string)
  "Guess the citation nesting on the current line.
If nesting 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))))
	nesting)
    (and
     (= start (or (string-match sc-citation-leader-regexp string start) -1))
     (setq start (match-end 0))
     (= start (or (string-match sc-citation-delimiter-regexp string start) -1))
     (setq nesting (match-string 0 string)
	   start (match-end 0))
     (= start (or (string-match sc-citation-separator-regexp string start) -1))
     nesting)))