changeset 23118:d311287a03a6

(find-function-search-for-symbol): Look for compressed library files too.
author Dave Love <fx@gnu.org>
date Thu, 27 Aug 1998 09:21:01 +0000
parents 13247082e0ed
children 5eff8af4eebd
files lisp/emacs-lisp/find-func.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/find-func.el	Thu Aug 27 07:47:15 1998 +0000
+++ b/lisp/emacs-lisp/find-func.el	Thu Aug 27 09:21:01 1998 +0000
@@ -111,6 +111,8 @@
   (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 @@
 			 (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)