changeset 20264:3b9b07f3eab5

(finder-find-library): Re-instate (with a different implementation) so that `locate-library' can find compressed files. (finder-commentary): Use it.
author Karl Heuer <kwzh@gnu.org>
date Sat, 15 Nov 1997 21:04:47 +0000
parents 7808c4885103
children 37a6af24de93
files lisp/finder.el
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/finder.el	Sat Nov 15 20:58:28 1997 +0000
+++ b/lisp/finder.el	Sat Nov 15 21:04:47 1997 +0000
@@ -224,9 +224,19 @@
     (shrink-window-if-larger-than-buffer)
     (finder-summary)))
 
+;; Search for a file named FILE on `load-path', also trying compressed
+;; versions if jka-compr is in use.
+(defun finder-find-library (library)
+  (or (locate-library library t)
+      (if (rassq 'jka-compr-handler file-name-handler-alist)
+        (or (locate-library (concat library ".gz") t)
+            (locate-library (concat library ".Z") t)
+            ;; last resort for MS-DOG et al
+            (locate-library (concat library "z"))))))
+
 (defun finder-commentary (file)
   (interactive)
-  (let* ((str (lm-commentary (locate-library file))))
+  (let* ((str (lm-commentary (finder-find-library file))))
     (if (null str)
 	(error "Can't find any Commentary section"))
     (pop-to-buffer "*Finder*")
@@ -295,7 +305,7 @@
     "\\<finder-mode-map>\\[finder-select] = select, \\[finder-mouse-select] = select, \\[finder-list-keywords] = to finder directory, \\[finder-exit] = quit, \\[finder-summary] = help")))
 
 (defun finder-exit ()
-  "Exit Finder mode and kill the buffer"
+  "Exit Finder mode and kill the buffer."
   (interactive)
   (or (one-window-p t)
       (delete-window))