changeset 22863:58584d6a8237

(Info-find-node): Position at the beginning of the node after calling Info-select-node. (Info-insert-dir): Catch errors in insert-file-contents.
author Richard M. Stallman <rms@gnu.org>
date Sat, 01 Aug 1998 19:03:50 +0000
parents 5a3802b71933
children da331c0f1092
files lisp/info.el
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Sat Aug 01 19:02:22 1998 +0000
+++ b/lisp/info.el	Sat Aug 01 19:03:50 1998 +0000
@@ -505,7 +505,8 @@
                        "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 @@
 		      (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))))