From 1bd19a31052ec2fa6e2cdb8aea0222dc30b3ddcb Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 6 Dec 2002 09:10:19 +0000 Subject: [PATCH] (Info-insert-dir): Make dir-node-cache variables buffer-local, so that killing the *info* buffer forces the dir-node to be rebuilt. --- lisp/ChangeLog | 6 ++++++ lisp/info.el | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a3d994ed64..47540e2b945 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-12-06 Miles Bader + + * info.el (Info-insert-dir): Make dir-node-cache variables + buffer-local, so that killing the *info* buffer forces the + dir-node to be rebuilt. + 2002-12-06 Markus Rost * finder.el (finder-compile-keywords): Don't insert a keyword to diff --git a/lisp/info.el b/lisp/info.el index 5bd9504304a..53630bce3a3 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -774,14 +774,13 @@ a case-insensitive match is tried." (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 @@ a case-insensitive match is tried." (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 @@ a case-insensitive match is tried." (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 -- 2.39.2