Function: outline-show-children

outline-show-children is an interactive and byte-compiled function defined in outline.el.gz.

Signature

(outline-show-children &optional LEVEL)

Documentation

Show all direct subheadings of this heading.

Prefix arg LEVEL is how many levels below the current level should be shown. Default is enough to cause the following heading to appear.

Key Bindings

Aliases

show-children (obsolete since 25.1)

Source Code

;; Defined in /usr/src/emacs/lisp/outline.el.gz
(defun outline-show-children (&optional level)
  "Show all direct subheadings of this heading.
Prefix arg LEVEL is how many levels below the current level should be shown.
Default is enough to cause the following heading to appear."
  (interactive "P")
  (setq level
	(if level (prefix-numeric-value level)
	  (save-excursion
	    (outline-back-to-heading)
	    (let ((start-level (funcall outline-level)))
	      (outline-next-heading)
	      (if (eobp)
		  1
		(max 1 (- (funcall outline-level) start-level)))))))
  (let (outline-view-change-hook)
    (save-excursion
      (outline-back-to-heading)
      (setq level (+ level (funcall outline-level)))
      (outline-map-region
       (lambda ()
	 (if (<= (funcall outline-level) level)
	     (outline-show-heading)))
       (point)
       (progn (outline-end-of-subtree)
	      (if (eobp) (point-max) (1+ (point)))))))
  (run-hooks 'outline-view-change-hook))