aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/help-funs.el49
-rw-r--r--src/ChangeLog4
2 files changed, 18 insertions, 35 deletions
diff --git a/lisp/help-funs.el b/lisp/help-funs.el
index 73cde500543..977626f3a29 100644
--- a/lisp/help-funs.el
+++ b/lisp/help-funs.el
@@ -82,7 +82,7 @@ With arg, you are asked to choose which language."
82 "Show the precise file name of Emacs library LIBRARY. 82 "Show the precise file name of Emacs library LIBRARY.
83This command searches the directories in `load-path' like `M-x load-library' 83This command searches the directories in `load-path' like `M-x load-library'
84to find the file that `M-x load-library RET LIBRARY RET' would load. 84to find the file that `M-x load-library RET LIBRARY RET' would load.
85Optional second arg NOSUFFIX non-nil means don't add suffixes `.elc' or `.el' 85Optional second arg NOSUFFIX non-nil means don't add suffixes `load-suffixes'
86to the specified name LIBRARY. 86to the specified name LIBRARY.
87 87
88If the optional third arg PATH is specified, that list of directories 88If the optional third arg PATH is specified, that list of directories
@@ -94,40 +94,19 @@ and the file name is displayed in the echo area."
94 (interactive (list (read-string "Locate library: ") 94 (interactive (list (read-string "Locate library: ")
95 nil nil 95 nil nil
96 t)) 96 t))
97 (let (result) 97 (catch 'answer
98 (catch 'answer 98 (dolist (dir (or path load-path))
99 (mapc 99 (dolist (suf (append (unless nosuffix load-suffixes) '("")))
100 (lambda (dir) 100 (let ((try (expand-file-name (concat library suf) dir)))
101 (mapc 101 (and (file-readable-p try)
102 (lambda (suf) 102 (null (file-directory-p try))
103 (let ((try (expand-file-name (concat library suf) dir))) 103 (progn
104 (and (file-readable-p try) 104 (if interactive-call
105 (null (file-directory-p try)) 105 (message "Library is file %s" (abbreviate-file-name try)))
106 (progn 106 (throw 'answer try))))))
107 (setq result try) 107 (if interactive-call
108 (throw 'answer try))))) 108 (message "No library %s in search path" library))
109 (if nosuffix 109 nil))
110 '("")
111 '(".elc" ".el" "")
112 (let ((basic '(".elc" ".el" ""))
113 (compressed '(".Z" ".gz" "")))
114 ;; If autocompression mode is on,
115 ;; consider all combinations of library suffixes
116 ;; and compression suffixes.
117 (if (rassq 'jka-compr-handler file-name-handler-alist)
118 (apply 'nconc
119 (mapcar (lambda (compelt)
120 (mapcar (lambda (baselt)
121 (concat baselt compelt))
122 basic))
123 compressed))
124 basic)))))
125 (or path load-path)))
126 (and interactive-call
127 (if result
128 (message "Library is file %s" result)
129 (message "No library %s in search path" library)))
130 result))
131 110
132 111
133;; Functions 112;; Functions
diff --git a/src/ChangeLog b/src/ChangeLog
index 799d43bf4fa..ebdcb23e3cd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12001-10-12 Stefan Monnier <monnier@cs.yale.edu>
2
3 * minibuf.c (keys_of_minibuf): Eliminate redundant bindings.
4
12001-10-12 Gerd Moellmann <gerd@gnu.org> 52001-10-12 Gerd Moellmann <gerd@gnu.org>
2 6
3 * xterm.c (notice_overwritten_cursor): Renamed from 7 * xterm.c (notice_overwritten_cursor): Renamed from