diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-12-23 03:20:32 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-12-23 03:20:32 +0000 |
commit | 10d858cffd4b0aee4e58c0ceefa77166d6d6f816 (patch) | |
tree | c9dd6c6160da61cc8afdc7f9a538d1cecebf2983 /lisp/info.el | |
parent | 939629d36412230bbb0e66e3e5bebeac5a71fb09 (diff) | |
download | emacs-10d858cffd4b0aee4e58c0ceefa77166d6d6f816.tar.gz |
(Info-insert-dir): Compute truename just once for each dir.
(Info-insert-dir): For generated menu items, add ::.
Diffstat (limited to 'lisp/info.el')
-rw-r--r-- | lisp/info.el | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/lisp/info.el b/lisp/info.el index 3552c27d943..a4042046845 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -330,36 +330,35 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." ;; Search the directory list for the directory file. (while dirs - (or (member (file-truename (expand-file-name (car dirs))) dirs-done) - (member (directory-file-name (file-truename (expand-file-name (car dirs)))) - dirs-done) - ;; Try several variants of specified name. - ;; Try upcasing, appending `.info', or both. - (let* (temp - (buffer - (cond - ((progn (setq temp (expand-file-name "DIR" (car dirs))) - (file-exists-p temp)) - (find-file-noselect temp)) - ((progn (setq temp (expand-file-name "dir" (car dirs))) - (file-exists-p temp)) - (find-file-noselect temp)) - ((progn (setq temp (expand-file-name "DIR.INFO" (car dirs))) - (file-exists-p temp)) - (find-file-noselect temp)) - ((progn (setq temp (expand-file-name "dir.info" (car dirs))) - (file-exists-p temp)) - (find-file-noselect temp))))) - (setq dirs-done - (cons (file-truename (expand-file-name (car dirs))) - (cons (directory-file-name - (file-truename (expand-file-name (car dirs)))) - dirs-done))) - (if buffer (setq buffers (cons buffer buffers) - Info-dir-file-attributes - (cons (cons (buffer-file-name buffer) - (file-attributes (buffer-file-name buffer))) - Info-dir-file-attributes))))) + (let ((truename (file-truename (expand-file-name (car dirs))))) + (or (member truename dirs-done) + (member (directory-file-name truename) dirs-done) + ;; Try several variants of specified name. + ;; Try upcasing, appending `.info', or both. + (let* (temp + (buffer + (cond + ((progn (setq temp (expand-file-name "DIR" (car dirs))) + (file-exists-p temp)) + (find-file-noselect temp)) + ((progn (setq temp (expand-file-name "dir" (car dirs))) + (file-exists-p temp)) + (find-file-noselect temp)) + ((progn (setq temp (expand-file-name "DIR.INFO" (car dirs))) + (file-exists-p temp)) + (find-file-noselect temp)) + ((progn (setq temp (expand-file-name "dir.info" (car dirs))) + (file-exists-p temp)) + (find-file-noselect temp))))) + (setq dirs-done + (cons truename + (cons (directory-file-name truename) + dirs-done))) + (if buffer (setq buffers (cons buffer buffers) + Info-dir-file-attributes + (cons (cons (buffer-file-name buffer) + (file-attributes (buffer-file-name buffer))) + Info-dir-file-attributes)))))) (setq dirs (cdr dirs))) ;; Distinguish the dir file that comes with Emacs from all the @@ -409,7 +408,7 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." (re-search-forward (concat "^\\* " (regexp-quote nodename) ":") end t) (progn - (insert "* " nodename "\n") + (insert "* " nodename "::" "\n") (setq menu-items (cons nodename menu-items))))) (setq nodes (cdr nodes)))) ;; Now take each node of each of the other buffers |