diff options
| author | Richard M. Stallman | 1997-04-20 21:02:06 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-04-20 21:02:06 +0000 |
| commit | 8af06c7cf9c8587c6f37f9fef73c36cf78833b0b (patch) | |
| tree | b09dc043b54b06cd972c15dc3a75255a4d51ce21 | |
| parent | 092af6d8677fa62567a0cf03502123cb177fb317 (diff) | |
| download | emacs-8af06c7cf9c8587c6f37f9fef73c36cf78833b0b.tar.gz emacs-8af06c7cf9c8587c6f37f9fef73c36cf78833b0b.zip | |
(texinfo-master-menu-header): Delete newline at start.
(texinfo-insert-master-menu-list): Add @detailmenu and
@end detailmenu commands.
| -rw-r--r-- | lisp/textmodes/texnfo-upd.el | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index 724d3617d13..8d45a5d2195 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el | |||
| @@ -723,6 +723,11 @@ second and subsequent lines of a multi-line description." | |||
| 723 | 723 | ||
| 724 | ;;; Making the master menu | 724 | ;;; Making the master menu |
| 725 | 725 | ||
| 726 | (defvar texinfo-master-menu-header | ||
| 727 | " --- The Detailed Node Listing ---\n" | ||
| 728 | "String inserted before lower level entries in Texinfo master menu. | ||
| 729 | It comes after the chapter-level menu entries.") | ||
| 730 | |||
| 726 | (defun texinfo-master-menu (update-all-nodes-menus-p) | 731 | (defun texinfo-master-menu (update-all-nodes-menus-p) |
| 727 | "Make a master menu for a whole Texinfo file. | 732 | "Make a master menu for a whole Texinfo file. |
| 728 | Non-nil argument (prefix, if interactive) means first update all | 733 | Non-nil argument (prefix, if interactive) means first update all |
| @@ -875,39 +880,37 @@ However, there does not need to be a title field." | |||
| 875 | 880 | ||
| 876 | (setq master-menu-list (cdr master-menu-list)) | 881 | (setq master-menu-list (cdr master-menu-list)) |
| 877 | 882 | ||
| 878 | ;; Only insert detailed master menu if there is one.... | 883 | ;; Now, insert all the other menus (if we have any). |
| 879 | (if (car (car master-menu-list)) | ||
| 880 | (insert texinfo-master-menu-header)) | ||
| 881 | |||
| 882 | ;; Now, insert all the other menus | ||
| 883 | 884 | ||
| 884 | ;; The menu master-menu-list has a form like this: | 885 | ;; The menu master-menu-list has a form like this: |
| 885 | ;; ((("beta" "alpha") "title-A") | 886 | ;; ((("beta" "alpha") "title-A") |
| 886 | ;; (("delta" "gamma") "title-B")) | 887 | ;; (("delta" "gamma") "title-B")) |
| 888 | |||
| 889 | (if (car (car master-menu-list)) | ||
| 890 | (progn | ||
| 891 | (insert "\n@detailmenu\n") | ||
| 892 | (insert texinfo-master-menu-header) | ||
| 887 | 893 | ||
| 888 | (while master-menu-list | 894 | (while master-menu-list |
| 889 | 895 | ||
| 890 | (message | 896 | (message |
| 891 | "Inserting menu for %s .... " (car (cdr (car master-menu-list)))) | 897 | "Inserting menu for %s .... " (car (cdr (car master-menu-list)))) |
| 892 | ;; insert title of menu section | 898 | ;; insert title of menu section |
| 893 | (insert "\n" (car (cdr (car master-menu-list))) "\n\n") | 899 | (insert "\n" (car (cdr (car master-menu-list))) "\n\n") |
| 894 | 900 | ||
| 895 | ;; insert each menu entry | 901 | ;; insert each menu entry |
| 896 | (setq this-very-menu-list (reverse (car (car master-menu-list)))) | 902 | (setq this-very-menu-list (reverse (car (car master-menu-list)))) |
| 897 | (while this-very-menu-list | 903 | (while this-very-menu-list |
| 898 | (insert "* " (car this-very-menu-list) "\n") | 904 | (insert "* " (car this-very-menu-list) "\n") |
| 899 | (setq this-very-menu-list (cdr this-very-menu-list))) | 905 | (setq this-very-menu-list (cdr this-very-menu-list))) |
| 900 | 906 | ||
| 901 | (setq master-menu-list (cdr master-menu-list))) | 907 | (setq master-menu-list (cdr master-menu-list))) |
| 908 | |||
| 909 | (insert "@end detaimenu\n"))) | ||
| 902 | 910 | ||
| 903 | ;; Finish menu | 911 | ;; Finish menu |
| 904 | (insert "@end menu\n\n"))) | 912 | (insert "@end menu\n\n"))) |
| 905 | 913 | ||
| 906 | (defvar texinfo-master-menu-header | ||
| 907 | "\n --- The Detailed Node Listing ---\n" | ||
| 908 | "String inserted before lower level entries in Texinfo master menu. | ||
| 909 | It comes after the chapter-level menu entries.") | ||
| 910 | |||
| 911 | (defun texinfo-locate-menu-p () | 914 | (defun texinfo-locate-menu-p () |
| 912 | "Find the next menu in the texinfo file. | 915 | "Find the next menu in the texinfo file. |
| 913 | If found, leave point after word `menu' on the `@menu' line, and return t. | 916 | If found, leave point after word `menu' on the `@menu' line, and return t. |