Function: texinfo-incorporate-descriptions

texinfo-incorporate-descriptions is a byte-compiled function defined in texnfo-upd.el.gz.

Signature

(texinfo-incorporate-descriptions NEW-MENU-LIST)

Documentation

Copy the old menu line descriptions that exist to the new menu.

Point must be at beginning of old menu.

If the node-name of the new menu is found in the old menu, insert the old description into the new entry.

For this function, the new menu is a list made up of lists of dotted pairs in which the first element of the pair is the node name and the second element the description. The new menu is changed destructively. The old menu is the menu as it appears in the Texinfo file.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/texnfo-upd.el.gz
(defun texinfo-incorporate-descriptions (new-menu-list)
  "Copy the old menu line descriptions that exist to the new menu.

Point must be at beginning of old menu.

If the node-name of the new menu is found in the old menu, insert the
old description into the new entry.

For this function, the new menu is a list made up of lists of dotted
pairs in which the first element of the pair is the node name and the
second element the description.  The new menu is changed destructively.
The old menu is the menu as it appears in the Texinfo file."

  (let ((end-of-menu (texinfo-menu-end)))
    (dolist (new-menu new-menu-list new-menu-list)
      (save-excursion			; keep point at beginning of menu
	(when (re-search-forward
	       ;; Existing nodes can have the form
	       ;;     * NODE NAME:: DESCRIPTION
	       ;; or
	       ;;     * MENU ITEM: NODE NAME.     DESCRIPTION.
	       ;;
	       ;; Recognize both when looking for the description.
	       (concat "\\* \\("	; so only menu entries are found
		       (regexp-quote (car new-menu)) "::"
		       "\\|"
		       ".*: " (regexp-quote (car new-menu)) "[.,\t\n]"
		       "\\)"
		       )		; so only complete entries are found
	       end-of-menu
	       t)
	  (setcdr new-menu (texinfo-menu-copy-old-description end-of-menu)))))))