Function: Info-find-node-in-buffer-1

Info-find-node-in-buffer-1 is a byte-compiled function defined in info.el.gz.

Signature

(Info-find-node-in-buffer-1 REGEXP CASE-FOLD)

Documentation

Find a node or anchor in the current buffer.

REGEXP is a regular expression matching nodes or references. Its first group should match Node: or Ref:. CASE-FOLD t means search for a case-insensitive match. Value is the position at which a match was found, or nil if not found.

Source Code

;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-find-node-in-buffer-1 (regexp case-fold)
  "Find a node or anchor in the current buffer.
REGEXP is a regular expression matching nodes or references.  Its first
group should match `Node:' or `Ref:'.
CASE-FOLD t means search for a case-insensitive match.
Value is the position at which a match was found, or nil if not found."
  (let ((case-fold-search case-fold)
	found)
    (save-excursion
      (if (Info-node-at-bob-matching regexp)
          (setq found (point))
        (while (and (not found)
                    (search-forward "\n\^_" nil t))
          (forward-line 1)
          (let ((beg (point)))
            (forward-line 1)
            (if (re-search-backward regexp beg t)
                (setq found (line-beginning-position)))))))
    found))