diff options
| author | Miles Bader | 2002-12-06 09:10:19 +0000 |
|---|---|---|
| committer | Miles Bader | 2002-12-06 09:10:19 +0000 |
| commit | 1bd19a31052ec2fa6e2cdb8aea0222dc30b3ddcb (patch) | |
| tree | 9db399893b8c0a794a776efa2aad71346acfba84 | |
| parent | 7692124fbfcf8303f5b467ef6103fa72c7e9a217 (diff) | |
| download | emacs-1bd19a31052ec2fa6e2cdb8aea0222dc30b3ddcb.tar.gz emacs-1bd19a31052ec2fa6e2cdb8aea0222dc30b3ddcb.zip | |
(Info-insert-dir): Make dir-node-cache variables buffer-local, so that
killing the *info* buffer forces the dir-node to be rebuilt.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2002-12-06 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * info.el (Info-insert-dir): Make dir-node-cache variables | ||
| 4 | buffer-local, so that killing the *info* buffer forces the | ||
| 5 | dir-node to be rebuilt. | ||
| 6 | |||
| 1 | 2002-12-06 Markus Rost <rost@math.ohio-state.edu> | 7 | 2002-12-06 Markus Rost <rost@math.ohio-state.edu> |
| 2 | 8 | ||
| 3 | * finder.el (finder-compile-keywords): Don't insert a keyword to | 9 | * 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." | |||
| 774 | (append Info-directory-list | 774 | (append Info-directory-list |
| 775 | Info-additional-directory-list) | 775 | Info-additional-directory-list) |
| 776 | Info-directory-list)) | 776 | Info-directory-list)) |
| 777 | (dir-file-attrs nil) | ||
| 777 | ;; Bind this in case the user sets it to nil. | 778 | ;; Bind this in case the user sets it to nil. |
| 778 | (case-fold-search t) | 779 | (case-fold-search t) |
| 779 | ;; This is set non-nil if we find a problem in some input files. | 780 | ;; This is set non-nil if we find a problem in some input files. |
| 780 | problems | 781 | problems |
| 781 | buffers buffer others nodes dirs-done) | 782 | buffers buffer others nodes dirs-done) |
| 782 | 783 | ||
| 783 | (setq Info-dir-file-attributes nil) | ||
| 784 | |||
| 785 | ;; Search the directory list for the directory file. | 784 | ;; Search the directory list for the directory file. |
| 786 | (while dirs | 785 | (while dirs |
| 787 | (let ((truename (file-truename (expand-file-name (car dirs))))) | 786 | (let ((truename (file-truename (expand-file-name (car dirs))))) |
| @@ -812,17 +811,19 @@ a case-insensitive match is tried." | |||
| 812 | (condition-case nil | 811 | (condition-case nil |
| 813 | (progn | 812 | (progn |
| 814 | (insert-file-contents file) | 813 | (insert-file-contents file) |
| 815 | (make-local-variable 'Info-dir-file-name) | 814 | (set (make-local-variable 'Info-dir-file-name) |
| 816 | (setq Info-dir-file-name file) | 815 | file) |
| 817 | (push (current-buffer) buffers) | 816 | (push (current-buffer) buffers) |
| 818 | (push (cons file attrs) Info-dir-file-attributes)) | 817 | (push (cons file attrs) dir-file-attrs)) |
| 819 | (error (kill-buffer (current-buffer)))))))) | 818 | (error (kill-buffer (current-buffer)))))))) |
| 820 | (or (cdr dirs) (setq Info-dir-contents-directory | 819 | (unless (cdr dirs) |
| 821 | (file-name-as-directory (car dirs)))) | 820 | (set (make-local-variable 'Info-dir-contents-directory) |
| 821 | (file-name-as-directory (car dirs)))) | ||
| 822 | (setq dirs (cdr dirs)))) | 822 | (setq dirs (cdr dirs)))) |
| 823 | 823 | ||
| 824 | (or buffers | 824 | (or buffers |
| 825 | (error "Can't find the Info directory node")) | 825 | (error "Can't find the Info directory node")) |
| 826 | |||
| 826 | ;; Distinguish the dir file that comes with Emacs from all the | 827 | ;; Distinguish the dir file that comes with Emacs from all the |
| 827 | ;; others. Yes, that is really what this is supposed to do. | 828 | ;; others. Yes, that is really what this is supposed to do. |
| 828 | ;; The definition of `Info-directory-list' puts it first on that | 829 | ;; The definition of `Info-directory-list' puts it first on that |
| @@ -900,8 +901,9 @@ a case-insensitive match is tried." | |||
| 900 | (goto-char (point-min)) | 901 | (goto-char (point-min)) |
| 901 | (if problems | 902 | (if problems |
| 902 | (message "Composing main Info directory...problems encountered, see `*Messages*'") | 903 | (message "Composing main Info directory...problems encountered, see `*Messages*'") |
| 903 | (message "Composing main Info directory...done"))) | 904 | (message "Composing main Info directory...done")) |
| 904 | (setq Info-dir-contents (buffer-string))) | 905 | (set (make-local-variable 'Info-dir-contents) (buffer-string)) |
| 906 | (set (make-local-variable 'Info-dir-file-attributes) dir-file-attrs))) | ||
| 905 | (setq default-directory Info-dir-contents-directory)) | 907 | (setq default-directory Info-dir-contents-directory)) |
| 906 | 908 | ||
| 907 | (defvar Info-streamline-headings | 909 | (defvar Info-streamline-headings |