Function: allout-end-of-subtree

allout-end-of-subtree is an interactive and byte-compiled function defined in allout.el.gz.

Signature

(allout-end-of-subtree &optional CURRENT INCLUDE-TRAILING-BLANK)

Documentation

Put point at the end of the last leaf in the containing topic.

Optional CURRENT means put point at the end of the containing visible topic.

Optional INCLUDE-TRAILING-BLANK means include a trailing blank line, if any, as part of the subtree. Otherwise, that trailing blank will be excluded as delimiting whitespace between topics.

Returns the value of point.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_   > allout-end-of-subtree (&optional current include-trailing-blank)
(defun allout-end-of-subtree (&optional current include-trailing-blank)
  "Put point at the end of the last leaf in the containing topic.

Optional CURRENT means put point at the end of the containing
visible topic.

Optional INCLUDE-TRAILING-BLANK means include a trailing blank line, if
any, as part of the subtree.  Otherwise, that trailing blank will be
excluded as delimiting whitespace between topics.

Returns the value of point."
  (interactive "P")
  (if current
      (allout-back-to-current-heading)
    (allout-goto-prefix-doublechecked))
  (let ((level allout-recent-depth))
    (allout-next-heading)
    (while (and (not (eobp))
                (> allout-recent-depth level))
      (allout-next-heading))
    (if (eobp)
        (allout-end-of-entry)
      (forward-char -1))
    (if (and (not include-trailing-blank) (= ?\n (preceding-char)))
         (forward-char -1))
    (setq allout-recent-end-of-subtree (point))))