diff options
author | Karl Heuer <kwzh@gnu.org> | 1997-11-15 21:04:47 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1997-11-15 21:04:47 +0000 |
commit | 35863d776f04e2eddfee7799d49e148d130cf05d (patch) | |
tree | 1699b64c9aa8d3bc1faa36112b227e4d865a5a79 /lisp/finder.el | |
parent | 183e4bd6f1410210a6e69d8fda12bd0f4eabd212 (diff) | |
download | emacs-35863d776f04e2eddfee7799d49e148d130cf05d.tar.gz |
(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.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/finder.el b/lisp/finder.el index 6bb763f8e55..3d8bb281fe7 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)) |