Function: rst-forward-indented-block

rst-forward-indented-block is a byte-compiled function defined in rst.el.gz.

Signature

(rst-forward-indented-block &optional COLUMN LIMIT)

Documentation

Move forward across one indented block.

Find the next (i.e. excluding the current line) non-empty line which is not indented at least to COLUMN (defaults to the column of the point). Move point to first character of this line or the first of the empty lines immediately before it and return that position. If there is no such line before LIMIT (defaults to the end of the buffer) return nil and do not move point.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Indented blocks

(defun rst-forward-indented-block (&optional column limit)
  ;; testcover: ok.
  "Move forward across one indented block.
Find the next (i.e. excluding the current line) non-empty line
which is not indented at least to COLUMN (defaults to the column
of the point).  Move point to first character of this line or the
first of the empty lines immediately before it and return that
position.  If there is no such line before LIMIT (defaults to the
end of the buffer) return nil and do not move point."
  (let (fnd candidate)
    (setq fnd (rst-apply-indented-blocks
               (line-beginning-position 2) ; Skip the current line
	       (or limit (point-max)) (or column (current-column))
               (lambda (_count _in-first _in-sub in-super in-empty _relind)
                 (cond
                  (in-empty
                   (setq candidate (or candidate (line-beginning-position)))
                   nil)
                  (in-super
                   (or candidate (line-beginning-position)))
                  (t ; Non-empty, same or more indented line.
                   (setq candidate nil)
                   nil)))))
    (when fnd
      (goto-char fnd))))