diff options
| author | Dave Love | 1999-03-24 14:25:58 +0000 |
|---|---|---|
| committer | Dave Love | 1999-03-24 14:25:58 +0000 |
| commit | f601cd3e35ea507c8e5a253e1ff20b4c6f4f79cd (patch) | |
| tree | 623da24f8cdbf6ab7612bff8afdd391c6f3951d0 /lisp | |
| parent | 4d80b2cc0f808c42a78db18301c3adfc38c73020 (diff) | |
| download | emacs-f601cd3e35ea507c8e5a253e1ff20b4c6f4f79cd.tar.gz emacs-f601cd3e35ea507c8e5a253e1ff20b4c6f4f79cd.zip | |
(Info-directory-list): Revert change to re-writing
Info-default-directory-list, but put `alternative' first.
(Info-insert-dir): Modify selecting the top dir file as a
consequence.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/info.el | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lisp/info.el b/lisp/info.el index a6acbe512c2..0deffb71bda 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -87,8 +87,8 @@ The Lisp code is executed when the node is selected.") | |||
| 87 | (if path | 87 | (if path |
| 88 | (split-string path (regexp-quote path-separator)) | 88 | (split-string path (regexp-quote path-separator)) |
| 89 | (if (and sibling (file-exists-p sibling)) | 89 | (if (and sibling (file-exists-p sibling)) |
| 90 | (setq alternative sibling) | 90 | (setq alternative sibling) ; uninstalled, Emacs builddir != srcdir |
| 91 | (setq alternative source)) | 91 | (setq alternative source)) ; uninstalled, builddir != srcdir |
| 92 | (if (or (member alternative Info-default-directory-list) | 92 | (if (or (member alternative Info-default-directory-list) |
| 93 | (not (file-exists-p alternative)) | 93 | (not (file-exists-p alternative)) |
| 94 | ;; On DOS/NT, we use movable executables always, | 94 | ;; On DOS/NT, we use movable executables always, |
| @@ -101,16 +101,11 @@ The Lisp code is executed when the node is selected.") | |||
| 101 | (expand-file-name "lib-src/" | 101 | (expand-file-name "lib-src/" |
| 102 | installation-directory))))) | 102 | installation-directory))))) |
| 103 | Info-default-directory-list | 103 | Info-default-directory-list |
| 104 | ;; Substitute the alternative for occurences of the | 104 | ;; `alternative' contains the Info files that came with this |
| 105 | ;; installation directory. The latter occurs last, but maybe | 105 | ;; version, so we should look there first. `Info-insert-dir' |
| 106 | ;; more than once, so that it overrides /usr/info in | 106 | ;; currently expects to find `alternative' first on the list. |
| 107 | ;; particular. | 107 | (cons alternative |
| 108 | (let ((instdir (car (last Info-default-directory-list)))) | 108 | (reverse (cdr (reverse Info-default-directory-list))))))) |
| 109 | (mapcar (lambda (dir) | ||
| 110 | (if (string= dir instdir) | ||
| 111 | alternative | ||
| 112 | dir)) | ||
| 113 | Info-default-directory-list))))) | ||
| 114 | "List of directories to search for Info documentation files. | 109 | "List of directories to search for Info documentation files. |
| 115 | nil means not yet initialized. In this case, Info uses the environment | 110 | nil means not yet initialized. In this case, Info uses the environment |
| 116 | variable INFOPATH to initialize it, or `Info-default-directory-list' | 111 | variable INFOPATH to initialize it, or `Info-default-directory-list' |
| @@ -648,9 +643,10 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." | |||
| 648 | (error "Can't find the Info directory node")) | 643 | (error "Can't find the Info directory node")) |
| 649 | ;; Distinguish the dir file that comes with Emacs from all the | 644 | ;; Distinguish the dir file that comes with Emacs from all the |
| 650 | ;; others. Yes, that is really what this is supposed to do. | 645 | ;; others. Yes, that is really what this is supposed to do. |
| 651 | ;; If it doesn't work, fix it. | 646 | ;; The definition of `Info-directory-list' puts it first on that |
| 652 | (setq buffer (car buffers) | 647 | ;; list and so last in `buffers' at this point. |
| 653 | others (cdr buffers)) | 648 | (setq buffer (car (last buffers)) |
| 649 | others (delq buffer buffers)) | ||
| 654 | 650 | ||
| 655 | ;; Insert the entire original dir file as a start; note that we've | 651 | ;; Insert the entire original dir file as a start; note that we've |
| 656 | ;; already saved its default directory to use as the default | 652 | ;; already saved its default directory to use as the default |