Variable: outline-search-function

outline-search-function is a customizable and buffer-local variable defined in outline.el.gz.

Documentation

If non-nil, the function to search the next outline heading.

When nil, headings are found by searching for outline-regexp.

The function is called with four optional arguments: BOUND, MOVE, BACKWARD, LOOKING-AT. The first two arguments BOUND and MOVE are almost the same as the BOUND and NOERROR arguments of re-search-forward, with the difference that MOVE accepts only a boolean, either nil or non-nil. When the argument BACKWARD is non-nil, the search should search backward like re-search-backward does. In case of a successful search, the function should return non-nil, move point, and set match-data appropriately. When the argument LOOKING-AT is non-nil, it should imitate the function looking-at.

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

View in manual

Probably introduced at or before Emacs version 32.1.

Source Code

;; Defined in /usr/src/emacs/lisp/outline.el.gz
;;;###autoload(put 'outline-heading-end-regexp 'safe-local-variable 'stringp)

(defcustom outline-search-function nil
  "If non-nil, the function to search the next outline heading.
When nil, headings are found by searching for `outline-regexp'.

The function is called with four optional arguments: BOUND, MOVE, BACKWARD,
LOOKING-AT.  The first two arguments BOUND and MOVE are almost the same as
the BOUND and NOERROR arguments of `re-search-forward', with the difference
that MOVE accepts only a boolean, either nil or non-nil.  When the argument
BACKWARD is non-nil, the search should search backward like
`re-search-backward' does.  In case of a successful search, the
function should return non-nil, move point, and set match-data
appropriately.  When the argument LOOKING-AT is non-nil, it should
imitate the function `looking-at'."
  :type '(choice (const :tag "Use `outline-regexp'" nil)
                 (function-item :tag "Search by `outline-regexp' (regexp-based)"
                                outline-search-from-regexp)
                 (function-item :tag "Search by `outline-level' text property"
                                outline-search-level)
                 (function :tag "Other function"))
  :group 'outlines
  :version "32.1")