]> code.delx.au - gnu-emacs/commitdiff
(find-function-search-for-symbol): Look
authorDave Love <fx@gnu.org>
Thu, 27 Aug 1998 09:21:01 +0000 (09:21 +0000)
committerDave Love <fx@gnu.org>
Thu, 27 Aug 1998 09:21:01 +0000 (09:21 +0000)
for compressed library files too.

lisp/emacs-lisp/find-func.el

index 53e06d590ffad1d29f0fddf9587888ee5812ef8d..4adf67346a78d49d81b3f570063225e728d7a8f9 100644 (file)
@@ -111,6 +111,8 @@ If VARIABLE-P is nil, `find-function-regexp' is used, otherwise
   (if (string-match "\\.el\\(c\\)\\'" library)
       (setq library (substring library 0 (match-beginning 1))))
   (let* ((path find-function-source-path)
+        (compression (or (rassq 'jka-compr-handler file-name-handler-alist)
+                         (member 'crypt-find-file-hook find-file-hooks)))
         (filename (if (and (file-exists-p library)
                            (not (file-directory-p library)))
                       library
@@ -119,7 +121,12 @@ If VARIABLE-P is nil, `find-function-regexp' is used, otherwise
                         (setq library (substring library 0
                                                  (match-beginning 1))))
                     (or (locate-library (concat library ".el") t path)
-                        (locate-library library t path)))))
+                        (locate-library library t path)
+                        (if compression
+                            (or (locate-library (concat library ".el.gz")
+                                                t path)
+                                (locate-library (concat library ".gz")
+                                                t path)))))))
     (if (not filename)
        (error "The library \"%s\" is not in the path." library))
     (with-current-buffer (find-file-noselect filename)