Function: texinfo-all-menus-update

texinfo-all-menus-update is an autoloaded, interactive and byte-compiled function defined in texnfo-upd.el.gz.

Signature

(texinfo-all-menus-update &optional UPDATE-ALL-NODES-P)

Documentation

Update every regular menu in a Texinfo file.

Update pre-existing master menu, if there is one.

Only single-file manuals are supported by this function. For multi-file manuals, use texinfo-multiple-files-update.

If called with a non-nil argument, this function first updates all the nodes in the buffer before updating the menus. Do NOT invoke this command with an argument if your Texinfo file uses @node lines without the Next, Previous, and Up pointers!

Indents the first line of descriptions, and leaves trailing whitespace in a menu that lacks descriptions, so descriptions will format well. In general, a menu should contain descriptions, because node names and section titles are often too short to explain a node well.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/texnfo-upd.el.gz
;;;###autoload
(defun texinfo-all-menus-update (&optional update-all-nodes-p)
  "Update every regular menu in a Texinfo file.
Update pre-existing master menu, if there is one.

Only single-file manuals are supported by this function.  For
multi-file manuals, use `texinfo-multiple-files-update'.

If called with a non-nil argument, this function first updates all the
nodes in the buffer before updating the menus.  Do NOT invoke this
command with an argument if your Texinfo file uses @node lines without
the `Next', `Previous', and `Up' pointers!

Indents the first line of descriptions, and leaves trailing whitespace
in a menu that lacks descriptions, so descriptions will format well.
In general, a menu should contain descriptions, because node names and
section titles are often too short to explain a node well."
  (interactive "P")
  (let ((case-fold-search t)
	master-menu-p)
    (save-excursion
      (push-mark (point-max) t)
      (goto-char (point-min))
      (message "Checking for a master menu in %s ... "(buffer-name))
      (save-excursion
	(when (search-forward texinfo-master-menu-header nil t)
	  ;; Check if @detailmenu kludge is used;
	  ;; if so, leave point before @detailmenu.
	  (search-backward "\n@detailmenu" (line-beginning-position -2) t)
	  ;; Remove detailed master menu listing
	  (setq master-menu-p t)
	  (goto-char (match-beginning 0))
	  (let ((end-of-detailed-menu-descriptions
		 (save-excursion     ; beginning of end menu line
		   (goto-char (texinfo-menu-end))
		   (beginning-of-line) (forward-char -1)
		   (point))))
	    (delete-region (point) end-of-detailed-menu-descriptions))))

      (when update-all-nodes-p
	(message "Updating all nodes in %s ... " (buffer-name))
	(texinfo-update-node (point-min) (point-max)))

      (message "Updating all menus in %s ... " (buffer-name))
      (texinfo-make-menu (point-max) (point-min))

      (when master-menu-p
	(message "Updating the master menu in %s... " (buffer-name))
	(texinfo-master-menu nil)))

    (message "Done...updated all the menus.  You may save the buffer.")))