Variable: outline-default-state

outline-default-state is a customizable variable defined in outline.el.gz.

Value

nil

Documentation

If non-nil, some headings are initially outlined.

Note that the default state is applied when Outline major and minor modes are set or when the command outline-apply-default-state is called interactively.

When nil, no default state is defined and outline-apply-default-state is a no-op.

If equal to outline-show-all, all text of buffer is shown.

If equal to outline-show-only-headings, show only headings, whatever their level is.

If equal to a number, show only headings up to and including the corresponding level. See outline-default-rules to customize visibility of the subtree at that level.

If equal to a lambda function or function name, this function is expected to toggle headings visibility, and will be called without arguments after the mode is enabled. Heading visibility can be changed with functions such as outline-show-subtree, outline-show-entry, outline-hide-entry etc.

This variable was added, or its default value changed, in Emacs 29.1.

View in manual

Probably introduced at or before Emacs version 29.1.

Source Code

;; Defined in /usr/src/emacs/lisp/outline.el.gz
;;; Initial visibility

(defcustom outline-default-state nil
  "If non-nil, some headings are initially outlined.

Note that the default state is applied when Outline major and
minor modes are set or when the command
`outline-apply-default-state' is called interactively.

When nil, no default state is defined and
`outline-apply-default-state' is a no-op.

If equal to `outline-show-all', all text of buffer is shown.

If equal to `outline-show-only-headings', show only headings,
whatever their level is.

If equal to a number, show only headings up to and including the
corresponding level.  See `outline-default-rules' to customize
visibility of the subtree at that level.

If equal to a lambda function or function name, this function is
expected to toggle headings visibility, and will be called
without arguments after the mode is enabled.  Heading visibility
can be changed with functions such as `outline-show-subtree',
`outline-show-entry', `outline-hide-entry' etc."
  :version "29.1"
  :type '(choice (const :tag "Disabled" nil)
                 (const :tag "Show all" outline-show-all)
                 (const :tag "Only headings" outline-show-only-headings)
                 (natnum :tag "Show headings up to level" :value 1)
                 (function :tag "Custom function")))