Function: texinfo-update-menu-region-beginning
texinfo-update-menu-region-beginning is a byte-compiled function
defined in texnfo-upd.el.gz.
Signature
(texinfo-update-menu-region-beginning LEVEL)
Documentation
Locate beginning of higher level section this section is within.
Return position of the beginning of the node line; do not move point. Thus, if this level is subsection, searches backwards for section node. Only argument is a string of the general type of section.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/texnfo-upd.el.gz
;;; Locating the major positions
(defun texinfo-update-menu-region-beginning (level)
"Locate beginning of higher level section this section is within.
Return position of the beginning of the node line; do not move point.
Thus, if this level is subsection, searches backwards for section node.
Only argument is a string of the general type of section."
(let ((case-fold-search t))
;; !! Known bug: if section immediately follows top node, this
;; returns the beginning of the buffer as the beginning of the
;; higher level section.
(cond
((< level 3)
(save-excursion
(goto-char (point-min))
(re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t)
(line-beginning-position)))
(t
(save-excursion
(re-search-backward
(concat
"\\(^@node\\).*\n" ; match node line
"\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any
"\\|" ; or
"\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any
"\\|" ; or
"\\(^@ifnottex[ ]*\n\\)" ; ifnottex line, if any
"\\)?" ; end of expression
(eval
(cdr (assoc level texinfo-update-menu-higher-regexps)) t))
nil
'goto-beginning)
(point))))))