diff options
| author | Gerd Moellmann | 2001-08-16 17:59:38 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-08-16 17:59:38 +0000 |
| commit | 21324fae4a13f944800717ea9ecb79cde89f288e (patch) | |
| tree | f3dd7ad38fcedd0ec6dee2484e502a516b17a829 | |
| parent | 30b50b5ccae58bc42bbb2e5ba341c0a02d231000 (diff) | |
| download | emacs-21324fae4a13f944800717ea9ecb79cde89f288e.tar.gz emacs-21324fae4a13f944800717ea9ecb79cde89f288e.zip | |
Update copyright notice, fix minor
typos.
(texinfo-find-lower-level-node, texinfo-find-higher-level-node)
(texinfo-menu-locate-entry-p, texinfo-start-menu-description)
(texinfo-update-menu-region-beginning)
(texinfo-update-menu-region-end, texinfo-find-pointer): Add new
command, @ifnottex, to regexps, so it is found.
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/textmodes/texnfo-upd.el | 92 |
2 files changed, 80 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 12349f5a933..8f60cb09d82 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | 2001-08-16 Miles Bader <miles@gnu.org> | 1 | 2001-08-16 Miles Bader <miles@gnu.org> |
| 2 | 2 | ||
| 3 | * simple.el (line-move): Undo previous change. | 3 | * simple.el (line-move): Undo previous change. |
| 4 | |||
| 4 | * comint.el (comint-send-input): Add `inhibit-line-move-field-capture' | 5 | * comint.el (comint-send-input): Add `inhibit-line-move-field-capture' |
| 5 | property to input-terminating `boundary' overlays to avoid | 6 | property to input-terminating `boundary' overlays to avoid |
| 6 | line-move wierdness. | 7 | line-move wierdness. |
| @@ -12,6 +13,16 @@ | |||
| 12 | window-scroll-functions are run with a window start that's | 13 | window-scroll-functions are run with a window start that's |
| 13 | temporarily outside of the restriction. | 14 | temporarily outside of the restriction. |
| 14 | 15 | ||
| 16 | 2001-08-16 Robert J. Chassell <bug-texinfo@gnu.org> | ||
| 17 | |||
| 18 | * textmodes/texnfo-upd.el: Update copyright notice, fix minor | ||
| 19 | typos. | ||
| 20 | (texinfo-find-lower-level-node, texinfo-find-higher-level-node) | ||
| 21 | (texinfo-menu-locate-entry-p, texinfo-start-menu-description) | ||
| 22 | (texinfo-update-menu-region-beginning) | ||
| 23 | (texinfo-update-menu-region-end, texinfo-find-pointer): Add new | ||
| 24 | command, @ifnottex, to regexps, so it is found. | ||
| 25 | |||
| 15 | 2001-08-16 Andrew Innes <andrewi@gnu.org> | 26 | 2001-08-16 Andrew Innes <andrewi@gnu.org> |
| 16 | 27 | ||
| 17 | * makefile.nt (DONTCOMPILE): Omit bindings.el. | 28 | * makefile.nt (DONTCOMPILE): Omit bindings.el. |
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index a474e4c716c..49955b37748 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; texnfo-upd.el --- utilities for updating nodes and menus in Texinfo files | 1 | ;;; texnfo-upd.el --- utilities for updating nodes and menus in Texinfo files |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Robert J. Chassell | 5 | ;; Author: Robert J. Chassell |
| 6 | ;; Maintainer: bug-texinfo@gnu.org | 6 | ;; Maintainer: bug-texinfo@gnu.org |
| @@ -290,7 +290,10 @@ of the node if one is found; else do not move point." | |||
| 290 | "\\(^@node\\).*\n" ; match node line | 290 | "\\(^@node\\).*\n" ; match node line |
| 291 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any | 291 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any |
| 292 | "\\|" ; or | 292 | "\\|" ; or |
| 293 | "\\(^@ifinfo[ ]*\n\\)\\)?" ; ifinfo line, if any | 293 | "\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any |
| 294 | "\\|" ; or | ||
| 295 | "\\(^@ifnottex[ ]*\n\\)" ; ifnottex line, if any | ||
| 296 | "\\)?" ; end of expression | ||
| 294 | (eval (cdr (assoc level texinfo-update-menu-lower-regexps)))) | 297 | (eval (cdr (assoc level texinfo-update-menu-lower-regexps)))) |
| 295 | ;; the next higher level node marks the end of this | 298 | ;; the next higher level node marks the end of this |
| 296 | ;; section, and no lower level node will be found beyond | 299 | ;; section, and no lower level node will be found beyond |
| @@ -320,7 +323,10 @@ if the match is found there, the value is t and point does not move." | |||
| 320 | "\\(^@node\\).*\n" ; match node line | 323 | "\\(^@node\\).*\n" ; match node line |
| 321 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any | 324 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any |
| 322 | "\\|" ; or | 325 | "\\|" ; or |
| 323 | "\\(^@ifinfo[ ]*\n\\)\\)?" ; ifinfo line, if any | 326 | "\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any |
| 327 | "\\|" ; or | ||
| 328 | "\\(^@ifnottex[ ]*\n\\)" ; ifnottex line, if any | ||
| 329 | "\\)?" ; end of expression | ||
| 324 | (eval (cdr (assoc level texinfo-update-menu-higher-regexps)))) | 330 | (eval (cdr (assoc level texinfo-update-menu-higher-regexps)))) |
| 325 | region-end t) | 331 | region-end t) |
| 326 | (progn (beginning-of-line) t)))))) | 332 | (progn (beginning-of-line) t)))))) |
| @@ -368,7 +374,10 @@ The function finds entries of the same type. Thus `subsections' and | |||
| 368 | "\\(^@node\\).*\n" ; match node line | 374 | "\\(^@node\\).*\n" ; match node line |
| 369 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any | 375 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any |
| 370 | "\\|" ; or | 376 | "\\|" ; or |
| 371 | "\\(^@ifinfo[ ]*\n\\)\\)?" ; ifinfo line, if any | 377 | "\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any |
| 378 | "\\|" ; or | ||
| 379 | "\\(^@ifnottex[ ]*\n\\)" ; ifnottex line, if any | ||
| 380 | "\\)?" ; end of expression | ||
| 372 | (eval | 381 | (eval |
| 373 | (cdr (assoc level texinfo-update-menu-same-level-regexps)))) | 382 | (cdr (assoc level texinfo-update-menu-same-level-regexps)))) |
| 374 | search-end | 383 | search-end |
| @@ -538,7 +547,7 @@ Signal an error if not end of menu." | |||
| 538 | (save-excursion | 547 | (save-excursion |
| 539 | (if (re-search-forward "^@end menu" nil t) | 548 | (if (re-search-forward "^@end menu" nil t) |
| 540 | (point) | 549 | (point) |
| 541 | (error "Menu does not have an end")))) | 550 | (error "Menu does not have an end.")))) |
| 542 | 551 | ||
| 543 | (defun texinfo-delete-old-menu (beginning first) | 552 | (defun texinfo-delete-old-menu (beginning first) |
| 544 | "Delete the old menu. Point must be in or after menu. | 553 | "Delete the old menu. Point must be in or after menu. |
| @@ -626,7 +635,7 @@ complements the node name rather than repeats it as a title does." | |||
| 626 | ;; "Double colon" entry line; menu entry and node name are the same, | 635 | ;; "Double colon" entry line; menu entry and node name are the same, |
| 627 | ((search-forward "::" (save-excursion (end-of-line) (point)) t) | 636 | ((search-forward "::" (save-excursion (end-of-line) (point)) t) |
| 628 | (if (looking-at "[ \t]*[^ \t\n]+") | 637 | (if (looking-at "[ \t]*[^ \t\n]+") |
| 629 | (error "Descriptive text already exists")) | 638 | (error "Descriptive text already exists.")) |
| 630 | (skip-chars-backward ": \t") | 639 | (skip-chars-backward ": \t") |
| 631 | (setq node-name (buffer-substring beginning (point)))) | 640 | (setq node-name (buffer-substring beginning (point)))) |
| 632 | 641 | ||
| @@ -639,7 +648,7 @@ complements the node name rather than repeats it as a title does." | |||
| 639 | (save-excursion (forward-line 1) (point)) t) | 648 | (save-excursion (forward-line 1) (point)) t) |
| 640 | (progn | 649 | (progn |
| 641 | (if (looking-at "[ \t]*[^ \t\n]+") | 650 | (if (looking-at "[ \t]*[^ \t\n]+") |
| 642 | (error "Descriptive text already exists")) | 651 | (error "Descriptive text already exists.")) |
| 643 | (skip-chars-backward "., \t") | 652 | (skip-chars-backward "., \t") |
| 644 | (setq node-name (buffer-substring beginning (point)))) | 653 | (setq node-name (buffer-substring beginning (point)))) |
| 645 | ;; Menu entry line ends in a return. | 654 | ;; Menu entry line ends in a return. |
| @@ -648,9 +657,9 @@ complements the node name rather than repeats it as a title does." | |||
| 648 | (skip-chars-backward " \t\n") | 657 | (skip-chars-backward " \t\n") |
| 649 | (setq node-name (buffer-substring beginning (point))) | 658 | (setq node-name (buffer-substring beginning (point))) |
| 650 | (if (= 0 (length node-name)) | 659 | (if (= 0 (length node-name)) |
| 651 | (error "No node name on this line") | 660 | (error "No node name on this line.") |
| 652 | (insert ".")))) | 661 | (insert ".")))) |
| 653 | (t (error "No node name on this line"))) | 662 | (t (error "No node name on this line."))) |
| 654 | ;; Search for node that matches node name, and copy the section title. | 663 | ;; Search for node that matches node name, and copy the section title. |
| 655 | (if (re-search-forward | 664 | (if (re-search-forward |
| 656 | (concat | 665 | (concat |
| @@ -661,6 +670,9 @@ complements the node name rather than repeats it as a title does." | |||
| 661 | "\\(\\(^@c \\|^@comment\\).*\n\\)" ; match comment line, if any | 670 | "\\(\\(^@c \\|^@comment\\).*\n\\)" ; match comment line, if any |
| 662 | "\\|" ; or | 671 | "\\|" ; or |
| 663 | "\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any | 672 | "\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any |
| 673 | "\\|" ; or | ||
| 674 | "\\(^@ifnottex[ ]*\n\\)" ; ifnottex line, if any | ||
| 675 | "\\)?" ; end of expression | ||
| 664 | "\\)?") | 676 | "\\)?") |
| 665 | nil t) | 677 | nil t) |
| 666 | (progn | 678 | (progn |
| @@ -674,7 +686,7 @@ complements the node name rather than repeats it as a title does." | |||
| 674 | (progn (end-of-line) | 686 | (progn (end-of-line) |
| 675 | (skip-chars-backward " \t") | 687 | (skip-chars-backward " \t") |
| 676 | (point))))) | 688 | (point))))) |
| 677 | (error "Cannot find node to match node name in menu entry"))) | 689 | (error "Cannot find node to match node name in menu entry."))) |
| 678 | ;; Return point to the menu and insert the title. | 690 | ;; Return point to the menu and insert the title. |
| 679 | (end-of-line) | 691 | (end-of-line) |
| 680 | (delete-region | 692 | (delete-region |
| @@ -990,7 +1002,7 @@ and leave point on the line before the `@end menu' line." | |||
| 990 | (goto-char end-of-menu) | 1002 | (goto-char end-of-menu) |
| 991 | ;; handle multi-line description | 1003 | ;; handle multi-line description |
| 992 | (if (not (re-search-backward "^\\* " nil t)) | 1004 | (if (not (re-search-backward "^\\* " nil t)) |
| 993 | (error "No entries in menu")) | 1005 | (error "No entries in menu.")) |
| 994 | (point)))) | 1006 | (point)))) |
| 995 | (while (< (point) last-entry) | 1007 | (while (< (point) last-entry) |
| 996 | (if (re-search-forward "^\\* " end-of-menu t) | 1008 | (if (re-search-forward "^\\* " end-of-menu t) |
| @@ -1071,7 +1083,10 @@ Only argument is a string of the general type of section." | |||
| 1071 | "\\(^@node\\).*\n" ; match node line | 1083 | "\\(^@node\\).*\n" ; match node line |
| 1072 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any | 1084 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any |
| 1073 | "\\|" ; or | 1085 | "\\|" ; or |
| 1074 | "\\(^@ifinfo[ ]*\n\\)\\)?" ; ifinfo line, if any | 1086 | "\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any |
| 1087 | "\\|" ; or | ||
| 1088 | "\\(^@ifnottex[ ]*\n\\)" ; ifnottex line, if any | ||
| 1089 | "\\)?" ; end of expression | ||
| 1075 | (eval | 1090 | (eval |
| 1076 | (cdr (assoc level texinfo-update-menu-higher-regexps)))) | 1091 | (cdr (assoc level texinfo-update-menu-higher-regexps)))) |
| 1077 | nil | 1092 | nil |
| @@ -1091,7 +1106,10 @@ string of the general type of section." | |||
| 1091 | "\\(^@node\\).*\n" ; match node line | 1106 | "\\(^@node\\).*\n" ; match node line |
| 1092 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any | 1107 | "\\(\\(\\(^@c\\).*\n\\)" ; match comment line, if any |
| 1093 | "\\|" ; or | 1108 | "\\|" ; or |
| 1094 | "\\(^@ifinfo[ ]*\n\\)\\)?" ; ifinfo line, if any | 1109 | "\\(^@ifinfo[ ]*\n\\)" ; ifinfo line, if any |
| 1110 | "\\|" ; or | ||
| 1111 | "\\(^@ifnottex[ ]*\n\\)" ; ifnottex line, if any | ||
| 1112 | "\\)?" ; end of expression | ||
| 1095 | (eval | 1113 | (eval |
| 1096 | ;; Never finds end of level above chapter so goes to end. | 1114 | ;; Never finds end of level above chapter so goes to end. |
| 1097 | (cdr (assoc level texinfo-update-menu-higher-regexps)))) | 1115 | (cdr (assoc level texinfo-update-menu-higher-regexps)))) |
| @@ -1355,12 +1373,19 @@ will be at some level higher in the Texinfo file. The fourth argument | |||
| 1355 | ;; Search for section commands accompanied by node lines; | 1373 | ;; Search for section commands accompanied by node lines; |
| 1356 | ;; ignore section commands in the middle of nodes. | 1374 | ;; ignore section commands in the middle of nodes. |
| 1357 | (if (re-search-forward | 1375 | (if (re-search-forward |
| 1358 | ;; A `Top' node is never a next pointer, so won't find it. | 1376 | ;; A `Top' node is never a next pointer, so won't find it. |
| 1359 | (concat | 1377 | (concat |
| 1360 | ;; Match node line. | 1378 | ;; Match node line. |
| 1361 | "\\(^@node\\).*\n" | 1379 | "\\(^@node\\).*\n" |
| 1362 | ;; Match comment or ifinfo line, if any | 1380 | ;; Match comment, ifinfo, ifnottex line, if any |
| 1363 | "\\(\\(\\(^@c\\).*\n\\)\\|\\(^@ifinfo[ ]*\n\\)\\)?" | 1381 | (concat |
| 1382 | "\\(\\(" | ||
| 1383 | "\\(^@c\\).*\n\\)" | ||
| 1384 | "\\|" | ||
| 1385 | "\\(^@ifinfo[ ]*\n\\)" | ||
| 1386 | "\\|" | ||
| 1387 | "\\(^@ifnottex[ ]*\n\\)" | ||
| 1388 | "\\)?") | ||
| 1364 | (eval | 1389 | (eval |
| 1365 | (cdr (assoc level texinfo-update-menu-same-level-regexps)))) | 1390 | (cdr (assoc level texinfo-update-menu-same-level-regexps)))) |
| 1366 | end | 1391 | end |
| @@ -1373,15 +1398,29 @@ will be at some level higher in the Texinfo file. The fourth argument | |||
| 1373 | "\\(" | 1398 | "\\(" |
| 1374 | ;; Match node line. | 1399 | ;; Match node line. |
| 1375 | "\\(^@node\\).*\n" | 1400 | "\\(^@node\\).*\n" |
| 1376 | ;; Match comment or ifinfo line, if any | 1401 | ;; Match comment, ifinfo, ifnottex line, if any |
| 1377 | "\\(\\(\\(^@c\\).*\n\\)\\|\\(^@ifinfo[ ]*\n\\)\\)?" | 1402 | (concat |
| 1403 | "\\(\\(" | ||
| 1404 | "\\(^@c\\).*\n\\)" | ||
| 1405 | "\\|" | ||
| 1406 | "\\(^@ifinfo[ ]*\n\\)" | ||
| 1407 | "\\|" | ||
| 1408 | "\\(^@ifnottex[ ]*\n\\)" | ||
| 1409 | "\\)?") | ||
| 1378 | (eval | 1410 | (eval |
| 1379 | (cdr (assoc level texinfo-update-menu-same-level-regexps))) | 1411 | (cdr (assoc level texinfo-update-menu-same-level-regexps))) |
| 1380 | "\\|" | 1412 | "\\|" |
| 1381 | ;; Match node line. | 1413 | ;; Match node line. |
| 1382 | "\\(^@node\\).*\n" | 1414 | "\\(^@node\\).*\n" |
| 1383 | ;; Match comment or ifinfo line, if any | 1415 | ;; Match comment, ifinfo, ifnottex line, if any |
| 1384 | "\\(\\(\\(^@c\\).*\n\\)\\|\\(^@ifinfo[ ]*\n\\)\\)?" | 1416 | (concat |
| 1417 | "\\(\\(" | ||
| 1418 | "\\(^@c\\).*\n\\)" | ||
| 1419 | "\\|" | ||
| 1420 | "\\(^@ifinfo[ ]*\n\\)" | ||
| 1421 | "\\|" | ||
| 1422 | "\\(^@ifnottex[ ]*\n\\)" | ||
| 1423 | "\\)?") | ||
| 1385 | (eval | 1424 | (eval |
| 1386 | (cdr (assoc level texinfo-update-menu-higher-regexps))) | 1425 | (cdr (assoc level texinfo-update-menu-higher-regexps))) |
| 1387 | "\\|" | 1426 | "\\|" |
| @@ -1398,8 +1437,15 @@ will be at some level higher in the Texinfo file. The fourth argument | |||
| 1398 | "\\(" | 1437 | "\\(" |
| 1399 | ;; Match node line. | 1438 | ;; Match node line. |
| 1400 | "\\(^@node\\).*\n" | 1439 | "\\(^@node\\).*\n" |
| 1401 | ;; Match comment or ifinfo line, if any | 1440 | ;; Match comment, ifinfo, ifnottex line, if any |
| 1402 | "\\(\\(\\(^@c\\).*\n\\)\\|\\(^@ifinfo[ ]*\n\\)\\)?" | 1441 | (concat |
| 1442 | "\\(\\(" | ||
| 1443 | "\\(^@c\\).*\n\\)" | ||
| 1444 | "\\|" | ||
| 1445 | "\\(^@ifinfo[ ]*\n\\)" | ||
| 1446 | "\\|" | ||
| 1447 | "\\(^@ifnottex[ ]*\n\\)" | ||
| 1448 | "\\)?") | ||
| 1403 | (eval (cdr (assoc level texinfo-update-menu-higher-regexps))) | 1449 | (eval (cdr (assoc level texinfo-update-menu-higher-regexps))) |
| 1404 | "\\|" | 1450 | "\\|" |
| 1405 | ;; Handle `Top' node specially. | 1451 | ;; Handle `Top' node specially. |
| @@ -1487,7 +1533,7 @@ Info `g*' command is inadequate." | |||
| 1487 | ;; update a single node | 1533 | ;; update a single node |
| 1488 | (let ((auto-fill-function nil) (auto-fill-hook nil)) | 1534 | (let ((auto-fill-function nil) (auto-fill-hook nil)) |
| 1489 | (if (not (re-search-backward "^@node" (point-min) t)) | 1535 | (if (not (re-search-backward "^@node" (point-min) t)) |
| 1490 | (error "Node line not found before this position")) | 1536 | (error "Node line not found before this position.")) |
| 1491 | (texinfo-sequentially-update-the-node) | 1537 | (texinfo-sequentially-update-the-node) |
| 1492 | (message | 1538 | (message |
| 1493 | "Done...sequentially updated the node . You may save the buffer.")) | 1539 | "Done...sequentially updated the node . You may save the buffer.")) |