aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/finder.el
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1997-11-15 21:04:47 +0000
committerKarl Heuer <[email protected]>1997-11-15 21:04:47 +0000
commit35863d776f04e2eddfee7799d49e148d130cf05d (patch)
tree1699b64c9aa8d3bc1faa36112b227e4d865a5a79 /lisp/finder.el
parent183e4bd6f1410210a6e69d8fda12bd0f4eabd212 (diff)
(finder-find-library): Re-instate (with a different
implementation) so that `locate-library' can find compressed files. (finder-commentary): Use it.
Diffstat (limited to 'lisp/finder.el')
-rw-r--r--lisp/finder.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/finder.el b/lisp/finder.el
index 6bb763f8e5..3d8bb281fe 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -224,9 +224,19 @@ arguments compiles from `load-path'."
(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 @@ arguments compiles from `load-path'."
"\\<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))