(Info-insert-dir): Add a save-excursion.
authorRichard M. Stallman <rms@gnu.org>
Sat, 26 Mar 1994 05:24:17 +0000 (05:24 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 26 Mar 1994 05:24:17 +0000 (05:24 +0000)
Require menu items for subnodes to end in ::.

lisp/info.el

index be9850f..0b45af5 100644 (file)
@@ -408,12 +408,15 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
            (end (save-excursion (search-forward "\^_" nil t) (point))))
        (while nodes
          (let ((nodename (car (car nodes))))
-           (or (member (downcase nodename) menu-items)
-               (re-search-forward (concat "^\\* " (regexp-quote nodename) ":")
-                                  end t)
-               (progn
-                 (insert "* " nodename "::" "\n")
-                 (setq menu-items (cons nodename menu-items)))))
+           (save-excursion
+             (or (member (downcase nodename) menu-items)
+                 (re-search-forward (concat "^\\* "
+                                            (regexp-quote nodename)
+                                            "::")
+                                    end t)
+                 (progn
+                   (insert "* " nodename "::" "\n")
+                   (setq menu-items (cons nodename menu-items))))))
          (setq nodes (cdr nodes))))
       ;; Now take each node of each of the other buffers
       ;; and merge it into the main buffer.