# HG changeset patch # User Miles Bader # Date 1039165735 0 # Node ID 036a8f0597c4a8df70364315cb17be3bb44b8f48 # Parent 12162bfc4abcb12b4b3a680962c29cc892fa4f14 (Info-insert-dir): Make dir-node-cache variables buffer-local, so that killing the *info* buffer forces the dir-node to be rebuilt. diff -r 12162bfc4abc -r 036a8f0597c4 lisp/info.el --- a/lisp/info.el Fri Dec 06 00:44:26 2002 +0000 +++ b/lisp/info.el Fri Dec 06 09:08:55 2002 +0000 @@ -774,14 +774,13 @@ (append Info-directory-list Info-additional-directory-list) Info-directory-list)) + (dir-file-attrs nil) ;; Bind this in case the user sets it to nil. (case-fold-search t) ;; This is set non-nil if we find a problem in some input files. problems buffers buffer others nodes dirs-done) - (setq Info-dir-file-attributes nil) - ;; Search the directory list for the directory file. (while dirs (let ((truename (file-truename (expand-file-name (car dirs))))) @@ -812,17 +811,19 @@ (condition-case nil (progn (insert-file-contents file) - (make-local-variable 'Info-dir-file-name) - (setq Info-dir-file-name file) + (set (make-local-variable 'Info-dir-file-name) + file) (push (current-buffer) buffers) - (push (cons file attrs) Info-dir-file-attributes)) + (push (cons file attrs) dir-file-attrs)) (error (kill-buffer (current-buffer)))))))) - (or (cdr dirs) (setq Info-dir-contents-directory - (file-name-as-directory (car dirs)))) + (unless (cdr dirs) + (set (make-local-variable 'Info-dir-contents-directory) + (file-name-as-directory (car dirs)))) (setq dirs (cdr dirs)))) (or buffers (error "Can't find the Info directory node")) + ;; Distinguish the dir file that comes with Emacs from all the ;; others. Yes, that is really what this is supposed to do. ;; The definition of `Info-directory-list' puts it first on that @@ -900,8 +901,9 @@ (goto-char (point-min)) (if problems (message "Composing main Info directory...problems encountered, see `*Messages*'") - (message "Composing main Info directory...done"))) - (setq Info-dir-contents (buffer-string))) + (message "Composing main Info directory...done")) + (set (make-local-variable 'Info-dir-contents) (buffer-string)) + (set (make-local-variable 'Info-dir-file-attributes) dir-file-attrs))) (setq default-directory Info-dir-contents-directory)) (defvar Info-streamline-headings