# HG changeset patch # User Richard M. Stallman # Date 739935408 0 # Node ID e2cbba9f0ea36f0c74dcd4c21ebf12bb54c8dd5a # Parent b00953e22dc3117a70ee7aec99b5a006eb994f73 (finder-find-library): New function. (finder-commentary): Use it. diff -r b00953e22dc3 -r e2cbba9f0ea3 lisp/finder.el --- 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*")