Function: allout-current-topic-collapsed-p
allout-current-topic-collapsed-p is a byte-compiled function defined
in allout.el.gz.
Signature
(allout-current-topic-collapsed-p &optional INCLUDE-SINGLE-LINERS)
Documentation
True if the currently visible containing topic is already collapsed.
Single line topics intrinsically can be considered as being both collapsed and uncollapsed. If optional INCLUDE-SINGLE-LINERS is true, then single-line topics are considered to be collapsed. By default, they are treated as being uncollapsed.
Source Code
;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_ > allout-current-topic-collapsed-p (&optional include-single-liners)
(defun allout-current-topic-collapsed-p (&optional include-single-liners)
"True if the currently visible containing topic is already collapsed.
Single line topics intrinsically can be considered as being both
collapsed and uncollapsed. If optional INCLUDE-SINGLE-LINERS is
true, then single-line topics are considered to be collapsed. By
default, they are treated as being uncollapsed."
(save-match-data
(save-excursion
(and
;; Is the topic all on one line (allowing for trailing blank line)?
(>= (progn (allout-back-to-current-heading)
(let ((inhibit-field-text-motion t))
(move-end-of-line 1))
(point))
(allout-end-of-current-subtree (not (looking-at "\n\n"))))
(or include-single-liners
(progn (backward-char 1) (allout-hidden-p)))))))