Mercurial > emacs
changeset 3708:e2cbba9f0ea3
(finder-find-library): New function.
(finder-commentary): Use it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 13 Jun 1993 01:36:48 +0000 |
parents | b00953e22dc3 |
children | 09e961c82be8 |
files | lisp/finder.el |
diffstat | 1 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/finder.el Sun Jun 13 01:16:05 1993 +0000 +++ b/lisp/finder.el Sun Jun 13 01:36:48 1993 +0000 @@ -187,9 +187,23 @@ (shrink-window-if-larger-than-buffer) (finder-summary))) +;; Search for a file named FILE the same way `load' would search. +(defun finder-find-library (file) + (if (file-name-absolute-p file) + file + (let ((dirs load-path) + found) + (while (and dirs (not found)) + (if (file-exists-p (expand-file-name (concat file ".el") (car dirs))) + (setq found (expand-file-name file (car dirs))) + (if (file-exists-p (expand-file-name file (car dirs))) + (setq found (expand-file-name file (car dirs))))) + (setq dirs (cdr dirs))) + found))) + (defun finder-commentary (file) (interactive) - (let* ((str (lm-commentary file))) + (let* ((str (lm-commentary (finder-find-library file)))) (if (null str) (error "Can't find any Commentary section.")) (pop-to-buffer "*Finder*")