Function: texinfo-sequentially-find-pointer

texinfo-sequentially-find-pointer is a byte-compiled function defined in texnfo-upd.el.gz.

Signature

(texinfo-sequentially-find-pointer LEVEL DIRECTION)

Documentation

Find next or previous pointer sequentially in Texinfo file, or up pointer.

Move point to section associated with the pointer. Find point even if it is in a different section.

Return type of pointer (either normal or no-pointer).

The first argument is a string specifying the general kind of section such as "chapter" or "section". The section found will be at the same hierarchical level in the Texinfo file, or, in the case of the up pointer, some level higher. The second argument (one of next, previous, or up) specifies whether to find the Next, Previous, or Up pointer.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/texnfo-upd.el.gz
(defun texinfo-sequentially-find-pointer (level direction)
  "Find next or previous pointer sequentially in Texinfo file, or up pointer.
Move point to section associated with the pointer.  Find point even if
it is in a different section.

Return type of pointer (either `normal' or `no-pointer').

The first argument is a string specifying the general kind of section
such as \"chapter\" or \"section\".  The section found will be at the
same hierarchical level in the Texinfo file, or, in the case of the up
pointer, some level higher.  The second argument (one of `next',
`previous', or `up') specifies whether to find the `Next', `Previous',
or `Up' pointer."
  (let ((case-fold-search t))
    (cond ((eq direction 'next)
	   (forward-line 3)             ; skip over current node
	   (if (re-search-forward
		texinfo-section-types-regexp
		(point-max)
		t)
	       'normal
	     'no-pointer))
	  ((eq direction 'previous)
	   (if (re-search-backward
		texinfo-section-types-regexp
		(point-min)
		t)
	       'normal
	     'no-pointer))
	  ((eq direction 'up)
	   (if (re-search-backward
		(eval (cdr (assoc level texinfo-update-menu-higher-regexps)) t)
		(point-min)
		t)
	       'normal
	     'no-pointer))
	  (t
           (error "texinfo-sequential-find-pointer: Lack proper arguments")))))