]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/texnfo-upd.el
(tmm-menubar-mouse): Add autoload cookie.
[gnu-emacs] / lisp / textmodes / texnfo-upd.el
index 8fbb7482773254c96c9f2c8c913a744830a6b228..cfd64adce4b1d7355584331b558e7991945923c4 100644 (file)
@@ -1,5 +1,6 @@
-;;; Texinfo mode utilities for updating nodes and menus in Texinfo files.
-;;; Copyright 1989, 1990, 1991, 1992 Free Software Foundation
+;;; texnfo-upd.el --- utilities for updating nodes and menus in Texinfo files
+
+;; Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
 
 ;; Author: Robert J. Chassell      
 ;; Maintainer: bug-texinfo@prep.ai.mit.edu
@@ -248,13 +249,19 @@ nodes in the buffer before updating the menus."
             (sleep-for 2)
             (push-mark (point-max) t)
             (goto-char (point-min))
-            (texinfo-update-node t)))
+           ;; Using the mark to pass bounds this way
+           ;; is kludgy, but it's not worth fixing. -- rms.
+           (let ((mark-active t))
+             (texinfo-update-node t))))
       
       (message "Updating all menus in %s ... " (buffer-name))        
       (sleep-for 2)
       (push-mark (point-max) t)
       (goto-char (point-min))
-      (texinfo-make-menu t)
+      ;; Using the mark to pass bounds this way
+      ;; is kludgy, but it's not worth fixing. -- rms.
+      (let ((mark-active t))
+       (texinfo-make-menu t))
       
       (if master-menu-p
           (progn
@@ -742,7 +749,7 @@ menus in the buffer (incorporating descriptions from pre-existing
 menus) before it constructs the master menu.
 
 The function removes the detailed part of an already existing master
-menu.  This action depends on the pre-exisitng master menu using the
+menu.  This action depends on the pre-existing master menu using the
 standard `texinfo-master-menu-header'.
 
 The master menu has the following format, which is adapted from the
@@ -995,10 +1002,11 @@ error if the node is not the top node and a section is not found."
                            t)
         "top")
        ((re-search-forward texinfo-section-types-regexp nil t)
-        (buffer-substring (progn (beginning-of-line) ; copy its name
-                                 (1+ (point)))
-                          (progn (forward-word 1)
-                                 (point))))
+        (buffer-substring-no-properties
+        (progn (beginning-of-line) ; copy its name
+               (1+ (point)))
+        (progn (forward-word 1)
+               (point))))
        (t
         (error
          "texinfo-specific-section-type: Chapter or section not found."))))))
@@ -1270,7 +1278,10 @@ which menu descriptions are indented. Its default value is 32."
   (save-excursion
     (push-mark (point-max) t)
     (goto-char (point-min))
-    (texinfo-update-node t)
+    ;; Using the mark to pass bounds this way
+    ;; is kludgy, but it's not worth fixing. -- rms.
+    (let ((mark-active t))
+      (texinfo-update-node t))
     (message "Done...updated every node.       You may save the buffer.")))
 
 (defun texinfo-update-the-node ()
@@ -1338,10 +1349,9 @@ Point must be at beginning of node line.  Does not move point."
 Starts from the current position of the cursor, and searches forward
 on the line for a comma and if one is found, deletes the rest of the
 line, including the comma.  Leaves point at beginning of line."
-  (if (search-forward "," (save-excursion (end-of-line) (point)) t)
-      (progn
-        (goto-char (1- (point)))
-        (kill-line nil)))
+  (let ((eol-point (save-excursion (end-of-line) (point))))
+    (if (search-forward "," eol-point t)
+        (delete-region (1- (point)) eol-point)))
   (beginning-of-line))
 
 (defun texinfo-find-pointer (beginning end level direction)