summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-04-20 21:02:06 +0000
committerRichard M. Stallman <rms@gnu.org>1997-04-20 21:02:06 +0000
commit8af06c7cf9c8587c6f37f9fef73c36cf78833b0b (patch)
treeb09dc043b54b06cd972c15dc3a75255a4d51ce21 /lisp
parent092af6d8677fa62567a0cf03502123cb177fb317 (diff)
downloademacs-8af06c7cf9c8587c6f37f9fef73c36cf78833b0b.tar.gz
emacs-8af06c7cf9c8587c6f37f9fef73c36cf78833b0b.tar.bz2
emacs-8af06c7cf9c8587c6f37f9fef73c36cf78833b0b.zip
(texinfo-master-menu-header): Delete newline at start.
(texinfo-insert-master-menu-list): Add @detailmenu and @end detailmenu commands.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/texnfo-upd.el51
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."
;;; Making the master menu
+(defvar texinfo-master-menu-header
+ " --- The Detailed Node Listing ---\n"
+ "String inserted before lower level entries in Texinfo master menu.
+It comes after the chapter-level menu entries.")
+
(defun texinfo-master-menu (update-all-nodes-menus-p)
"Make a master menu for a whole Texinfo file.
Non-nil argument (prefix, if interactive) means first update all
@@ -875,39 +880,37 @@ However, there does not need to be a title field."
(setq master-menu-list (cdr master-menu-list))
- ;; Only insert detailed master menu if there is one....
- (if (car (car master-menu-list))
- (insert texinfo-master-menu-header))
-
- ;; Now, insert all the other menus
+ ;; Now, insert all the other menus (if we have any).
;; The menu master-menu-list has a form like this:
;; ((("beta" "alpha") "title-A")
;; (("delta" "gamma") "title-B"))
+
+ (if (car (car master-menu-list))
+ (progn
+ (insert "\n@detailmenu\n")
+ (insert texinfo-master-menu-header)
- (while master-menu-list
-
- (message
- "Inserting menu for %s .... " (car (cdr (car master-menu-list))))
- ;; insert title of menu section
- (insert "\n" (car (cdr (car master-menu-list))) "\n\n")
-
- ;; insert each menu entry
- (setq this-very-menu-list (reverse (car (car master-menu-list))))
- (while this-very-menu-list
- (insert "* " (car this-very-menu-list) "\n")
- (setq this-very-menu-list (cdr this-very-menu-list)))
-
- (setq master-menu-list (cdr master-menu-list)))
+ (while master-menu-list
+
+ (message
+ "Inserting menu for %s .... " (car (cdr (car master-menu-list))))
+ ;; insert title of menu section
+ (insert "\n" (car (cdr (car master-menu-list))) "\n\n")
+
+ ;; insert each menu entry
+ (setq this-very-menu-list (reverse (car (car master-menu-list))))
+ (while this-very-menu-list
+ (insert "* " (car this-very-menu-list) "\n")
+ (setq this-very-menu-list (cdr this-very-menu-list)))
+
+ (setq master-menu-list (cdr master-menu-list)))
+
+ (insert "@end detaimenu\n")))
;; Finish menu
(insert "@end menu\n\n")))
-(defvar texinfo-master-menu-header
- "\n --- The Detailed Node Listing ---\n"
- "String inserted before lower level entries in Texinfo master menu.
-It comes after the chapter-level menu entries.")
-
(defun texinfo-locate-menu-p ()
"Find the next menu in the texinfo file.
If found, leave point after word `menu' on the `@menu' line, and return t.