# HG changeset patch # User Robert J. Chassell # Date 1015176607 0 # Node ID 77676c41d6fbccef41be88e0aebdc6d7e4871a67 # Parent 49dc01d3bc00187c93d3ba41dfcb08ad43b54f44 (texinfo-insert-menu): specify previously free variable `level' in a `let' statement, as done elsewhere. (texinfo-sequentially-find-pointer): replace unneeded free variable `beginning' with (point-min) expression. diff -r 49dc01d3bc00 -r 77676c41d6fb lisp/textmodes/texnfo-upd.el --- a/lisp/textmodes/texnfo-upd.el Sun Mar 03 17:28:52 2002 +0000 +++ b/lisp/textmodes/texnfo-upd.el Sun Mar 03 17:30:07 2002 +0000 @@ -699,9 +699,9 @@ (insert "\n")) ; end this menu entry (insert "@end menu") - (message - ;; FIXME: `level' is passed by dynamic scoping. - "Updated \"%s\" level menu following node: %s ... " level node-name)) + (let ((level (texinfo-hierarchic-level))) + (message + "Updated level \"%s\" menu following node: %s ... " level node-name))) ;;; Starting menu descriptions by inserting titles @@ -1557,6 +1557,21 @@ (texinfo-sequentially-insert-pointer level 'up) (texinfo-clean-up-node-line))))) +(defun texinfo-sequentially-insert-pointer (level direction) + "Insert the `Next', `Previous' or `Up' node name at point. +Move point forward. + +The first argument is the hierarchical level of the Texinfo file, a +string such as \"section\". The second argument is direction, one of +`next', `previous', or `up'." + + (end-of-line) + (insert + ", " + (save-excursion + (texinfo-pointer-name + (texinfo-sequentially-find-pointer level direction))))) + (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 @@ -1589,29 +1604,13 @@ ((eq direction 'up) (if (re-search-backward (eval (cdr (assoc level texinfo-update-menu-higher-regexps))) - ;; FIXME: passed many levels down via dynamic scoping! - beginning + (point-min) t) 'normal 'no-pointer)) (t (error "texinfo-sequential-find-pointer: lack proper arguments"))))) -(defun texinfo-sequentially-insert-pointer (level direction) - "Insert the `Next', `Previous' or `Up' node name at point. -Move point forward. - -The first argument is the hierarchical level of the Texinfo file, a -string such as \"section\". The second argument is direction, one of -`next', `previous', or `up'." - - (end-of-line) - (insert - ", " - (save-excursion - (texinfo-pointer-name - (texinfo-sequentially-find-pointer level direction))))) - ;;; Inserting `@node' lines ;; The `texinfo-insert-node-lines' function inserts `@node' lines as needed