Function: outline-search-from-regexp

outline-search-from-regexp is an autoloaded and byte-compiled function defined in outline.el.gz.

Signature

(outline-search-from-regexp &optional BOUND MOVE BACKWARD LOOKING-AT)

Documentation

Search for the next heading matching outline-regexp.

The arguments BOUND, MOVE, BACKWARD, and LOOKING-AT are described in outline-search-function. This function is intended to be used in outline-search-function by modes and minor modes that customize outline-regexp but do not need a custom search strategy. Install it with

  (setq-local outline-search-function #'outline-search-from-regexp)

Probably introduced at or before Emacs version 32.1.

Source Code

;; Defined in /usr/src/emacs/lisp/outline.el.gz
;;; Search regexp for outline headings

;;;###autoload
(defun outline-search-from-regexp (&optional bound move backward looking-at)
  "Search for the next heading matching `outline-regexp'.
The arguments BOUND, MOVE, BACKWARD, and LOOKING-AT are described
in `outline-search-function'.  This function is intended to be
used in `outline-search-function' by modes and minor modes that
customize `outline-regexp' but do not need a custom search strategy.
Install it with

  (setq-local outline-search-function #\\='outline-search-from-regexp)"
  (if looking-at
      (looking-at outline-regexp)
    (funcall (if backward #'re-search-backward #'re-search-forward)
             (concat "^\\(?:" outline-regexp "\\)")
             bound
             (if move 'move t))))