Function: rst-adornment-complete-p

rst-adornment-complete-p is a byte-compiled function defined in rst.el.gz.

Signature

(rst-adornment-complete-p ADO INDENT)

Documentation

Return t if the adornment ADO around point is complete using INDENT.

The adornment is complete if it is a completely correct reStructuredText adornment for the title line at point. This includes indentation and correct length of adornment lines.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
(defun rst-adornment-complete-p (ado indent)
  ;; testcover: ok.
  "Return t if the adornment ADO around point is complete using INDENT.
The adornment is complete if it is a completely correct
reStructuredText adornment for the title line at point.  This
includes indentation and correct length of adornment lines."
  ;; Note: we assume that the detection of the overline as being the underline
  ;; of a preceding title has already been detected, and has been eliminated
  ;; from the adornment that is given to us.
  (let ((exps (list "^" (rst-Ado-char ado)
		    (format "\\{%d\\}"
			    (+ (save-excursion
				 ;; Determine last column of title.
				 (end-of-line)
				 (current-column))
			       indent)) "$")))
    (and (rst-forward-line-looking-at +1 exps)
	 (or (rst-Ado-is-simple ado)
	     (rst-forward-line-looking-at -1 exps))
	 t))) ; Normalize return value.