aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-13 01:36:48 +0000
committerRichard M. Stallman1993-06-13 01:36:48 +0000
commitd90f825cd859f9593dd19a0933e0f7a8bb317d3c (patch)
tree5392c3c2d2231ae460878b17a668bbb1f868a457
parent60fc6069f89f7f4875f19b3ef5aad4909f966a11 (diff)
downloademacs-d90f825cd859f9593dd19a0933e0f7a8bb317d3c.tar.gz
emacs-d90f825cd859f9593dd19a0933e0f7a8bb317d3c.zip
(finder-find-library): New function.
(finder-commentary): Use it.
-rw-r--r--lisp/finder.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/finder.el b/lisp/finder.el
index 41e67723dde..44df466d7c6 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -187,9 +187,23 @@ arguments compiles from `load-path'."
187 (shrink-window-if-larger-than-buffer) 187 (shrink-window-if-larger-than-buffer)
188 (finder-summary))) 188 (finder-summary)))
189 189
190;; Search for a file named FILE the same way `load' would search.
191(defun finder-find-library (file)
192 (if (file-name-absolute-p file)
193 file
194 (let ((dirs load-path)
195 found)
196 (while (and dirs (not found))
197 (if (file-exists-p (expand-file-name (concat file ".el") (car dirs)))
198 (setq found (expand-file-name file (car dirs)))
199 (if (file-exists-p (expand-file-name file (car dirs)))
200 (setq found (expand-file-name file (car dirs)))))
201 (setq dirs (cdr dirs)))
202 found)))
203
190(defun finder-commentary (file) 204(defun finder-commentary (file)
191 (interactive) 205 (interactive)
192 (let* ((str (lm-commentary file))) 206 (let* ((str (lm-commentary (finder-find-library file))))
193 (if (null str) 207 (if (null str)
194 (error "Can't find any Commentary section.")) 208 (error "Can't find any Commentary section."))
195 (pop-to-buffer "*Finder*") 209 (pop-to-buffer "*Finder*")