diff options
| author | Robert J. Chassell | 2002-03-03 17:30:07 +0000 |
|---|---|---|
| committer | Robert J. Chassell | 2002-03-03 17:30:07 +0000 |
| commit | a056c2c7fa5e3c31bf1c9c524d77f4ca8dea992d (patch) | |
| tree | 3071c4917980f1de1faed5a337e80759d4e51d36 | |
| parent | e76d28d5e585be5212e703fe19ce4cbb0054f17b (diff) | |
| download | emacs-a056c2c7fa5e3c31bf1c9c524d77f4ca8dea992d.tar.gz emacs-a056c2c7fa5e3c31bf1c9c524d77f4ca8dea992d.zip | |
(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.
| -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." | |||
| 699 | 699 | ||
| 700 | (insert "\n")) ; end this menu entry | 700 | (insert "\n")) ; end this menu entry |
| 701 | (insert "@end menu") | 701 | (insert "@end menu") |
| 702 | (message | 702 | (let ((level (texinfo-hierarchic-level))) |
| 703 | ;; FIXME: `level' is passed by dynamic scoping. | 703 | (message |
| 704 | "Updated \"%s\" level menu following node: %s ... " level node-name)) | 704 | "Updated level \"%s\" menu following node: %s ... " level node-name))) |
| 705 | 705 | ||
| 706 | 706 | ||
| 707 | ;;; Starting menu descriptions by inserting titles | 707 | ;;; Starting menu descriptions by inserting titles |
| @@ -1557,6 +1557,21 @@ regardless of its hierarchical level." | |||
| 1557 | (texinfo-sequentially-insert-pointer level 'up) | 1557 | (texinfo-sequentially-insert-pointer level 'up) |
| 1558 | (texinfo-clean-up-node-line))))) | 1558 | (texinfo-clean-up-node-line))))) |
| 1559 | 1559 | ||
| 1560 | (defun texinfo-sequentially-insert-pointer (level direction) | ||
| 1561 | "Insert the `Next', `Previous' or `Up' node name at point. | ||
| 1562 | Move point forward. | ||
| 1563 | |||
| 1564 | The first argument is the hierarchical level of the Texinfo file, a | ||
| 1565 | string such as \"section\". The second argument is direction, one of | ||
| 1566 | `next', `previous', or `up'." | ||
| 1567 | |||
| 1568 | (end-of-line) | ||
| 1569 | (insert | ||
| 1570 | ", " | ||
| 1571 | (save-excursion | ||
| 1572 | (texinfo-pointer-name | ||
| 1573 | (texinfo-sequentially-find-pointer level direction))))) | ||
| 1574 | |||
| 1560 | (defun texinfo-sequentially-find-pointer (level direction) | 1575 | (defun texinfo-sequentially-find-pointer (level direction) |
| 1561 | "Find next or previous pointer sequentially in Texinfo file, or up pointer. | 1576 | "Find next or previous pointer sequentially in Texinfo file, or up pointer. |
| 1562 | Move point to section associated with the pointer. Find point even if | 1577 | Move point to section associated with the pointer. Find point even if |
| @@ -1589,29 +1604,13 @@ or `Up' pointer." | |||
| 1589 | ((eq direction 'up) | 1604 | ((eq direction 'up) |
| 1590 | (if (re-search-backward | 1605 | (if (re-search-backward |
| 1591 | (eval (cdr (assoc level texinfo-update-menu-higher-regexps))) | 1606 | (eval (cdr (assoc level texinfo-update-menu-higher-regexps))) |
| 1592 | ;; FIXME: passed many levels down via dynamic scoping! | 1607 | (point-min) |
| 1593 | beginning | ||
| 1594 | t) | 1608 | t) |
| 1595 | 'normal | 1609 | 'normal |
| 1596 | 'no-pointer)) | 1610 | 'no-pointer)) |
| 1597 | (t | 1611 | (t |
| 1598 | (error "texinfo-sequential-find-pointer: lack proper arguments"))))) | 1612 | (error "texinfo-sequential-find-pointer: lack proper arguments"))))) |
| 1599 | 1613 | ||
| 1600 | (defun texinfo-sequentially-insert-pointer (level direction) | ||
| 1601 | "Insert the `Next', `Previous' or `Up' node name at point. | ||
| 1602 | Move point forward. | ||
| 1603 | |||
| 1604 | The first argument is the hierarchical level of the Texinfo file, a | ||
| 1605 | string such as \"section\". The second argument is direction, one of | ||
| 1606 | `next', `previous', or `up'." | ||
| 1607 | |||
| 1608 | (end-of-line) | ||
| 1609 | (insert | ||
| 1610 | ", " | ||
| 1611 | (save-excursion | ||
| 1612 | (texinfo-pointer-name | ||
| 1613 | (texinfo-sequentially-find-pointer level direction))))) | ||
| 1614 | |||
| 1615 | 1614 | ||
| 1616 | ;;; Inserting `@node' lines | 1615 | ;;; Inserting `@node' lines |
| 1617 | ;; The `texinfo-insert-node-lines' function inserts `@node' lines as needed | 1616 | ;; The `texinfo-insert-node-lines' function inserts `@node' lines as needed |