diff options
author | Robert J. Chassell <bob@rattlesnake.com> | 2002-03-03 17:30:07 +0000 |
---|---|---|
committer | Robert J. Chassell <bob@rattlesnake.com> | 2002-03-03 17:30:07 +0000 |
commit | a056c2c7fa5e3c31bf1c9c524d77f4ca8dea992d (patch) | |
tree | 3071c4917980f1de1faed5a337e80759d4e51d36 /lisp/textmodes/texnfo-upd.el | |
parent | e76d28d5e585be5212e703fe19ce4cbb0054f17b (diff) | |
download | emacs-a056c2c7fa5e3c31bf1c9c524d77f4ca8dea992d.tar.gz |
(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.
Diffstat (limited to 'lisp/textmodes/texnfo-upd.el')
-rw-r--r-- | lisp/textmodes/texnfo-upd.el | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index f97c2b4bdbf..43a6f0d0ac0 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el @@ -699,9 +699,9 @@ is the menu entry name, and the cdr of P is the node name." (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 @@ regardless of its hierarchical level." (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 @@ or `Up' pointer." ((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 |