]> code.delx.au - gnu-emacs/blobdiff - lisp/info.el
(hif-nexttoken): Move to before first def.
[gnu-emacs] / lisp / info.el
index 1c6242375deab3d5a3f33bc8e4eb95f20fea6a83..660af03c959fbf57c35c7e9111b4b2317044d32a 100644 (file)
@@ -609,7 +609,7 @@ a case-insensitive match is tried."
               (erase-buffer)
               (if (eq filename t)
                   (Info-insert-dir)
-                (info-insert-file-contents filename t)
+                (info-insert-file-contents filename nil)
                 (setq default-directory (file-name-directory filename)))
               (set-buffer-modified-p nil)
               ;; See whether file has a tag table.  Record the location if yes.
@@ -1393,12 +1393,7 @@ FOOTNOTENAME may be an abbreviation of the reference name."
              (buffer-substring-no-properties beg (1- (point)))
            (skip-chars-forward " \t\n")
            (Info-following-node-name (if multi-line "^.,\t" "^.,\t\n"))))
-    (while (setq i (string-match "\n" str i))
-      (aset str i ?\ ))
-    ;; Collapse multiple spaces.
-    (while (string-match "  +" str)
-      (setq str (replace-match " " t t str)))
-    str))
+    (replace-regexp-in-string "[ \n]+" " " str)))
 
 ;; No one calls this.
 ;;(defun Info-menu-item-sequence (list)
@@ -1831,7 +1826,9 @@ parent node."
   (or (re-search-forward "\n\\* \\(.*\\<Index\\>\\)" nil t)
       (error "No index"))
   (goto-char (match-beginning 1))
-  (Info-goto-node (Info-extract-menu-node-name)))
+  ;; Protect Info-history so that the current node (Top) is not added to it.
+  (let ((Info-history nil))
+    (Info-goto-node (Info-extract-menu-node-name))))
 
 (defun Info-index (topic)
   "Look up a string TOPIC in the index for this file.
@@ -1857,16 +1854,14 @@ Give a blank topic name to go to the Index node itself."
                         (regexp-quote topic)))
        node
        (case-fold-search t))
-    ;; Here, and subsequently in this function,
-    ;; we bind Info-history to nil for internal node-switches
-    ;; so that we don't put junk in the history.
-    ;; In the first Info-goto-node call, above, we do update the history
-    ;; because that is what the user's previous node choice into it.
-    (let ((Info-history nil))
-      (Info-goto-index))
+    (Info-goto-index)
     (or (equal topic "")
        (let ((matches nil)
              (exact nil)
+             ;; We bind Info-history to nil for internal node-switches so
+             ;; that we don't put junk in the history.  In the first
+             ;; Info-goto-index call, above, we do update the history
+             ;; because that is what the user's previous node choice into it.
              (Info-history nil)
              found)
          (while