]> git.eshelyaron.com Git - emacs.git/commitdiff
(Info-find-node): Position at the beginning of the node
authorRichard M. Stallman <rms@gnu.org>
Sat, 1 Aug 1998 19:03:50 +0000 (19:03 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 1 Aug 1998 19:03:50 +0000 (19:03 +0000)
after calling Info-select-node.

(Info-insert-dir): Catch errors in insert-file-contents.

lisp/info.el

index e68b4c9f12148f09645921af240ff1aacc5034f3..72bd7815fa0d13ea24a3694ccf7c35adaa7c98b8 100644 (file)
@@ -505,7 +505,8 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
                        "No such anchor in tag table or node in tag table or file: %s"
                        nodename))))))
 
-          (Info-select-node)))
+          (Info-select-node)
+         (goto-char (point-min))))
     ;; If we did not finish finding the specified node,
     ;; go back to the previous one.
     (or Info-current-node no-going-back (null Info-history)
@@ -575,11 +576,14 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
                      (or buffers
                          (message "Composing main Info directory..."))
                      (set-buffer (generate-new-buffer " info dir"))
-                     (insert-file-contents file)
-                     (setq buffers (cons (current-buffer) buffers)
-                           Info-dir-file-attributes
-                           (cons (cons file attrs)
-                                 Info-dir-file-attributes))))))
+                     (condition-case nil
+                         (progn
+                           (insert-file-contents file)
+                           (setq buffers (cons (current-buffer) buffers)
+                                 Info-dir-file-attributes
+                                 (cons (cons file attrs)
+                                       Info-dir-file-attributes)))
+                       (error (kill-buffer (current-buffer))))))))
          (or (cdr dirs) (setq Info-dir-contents-directory
                               (file-name-as-directory (car dirs))))
          (setq dirs (cdr dirs))))