Mercurial > emacs
comparison lisp/emacs-lisp/find-func.el @ 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 | 043247d0ced9 |
children | bf60e2b4da28 |
comparison
equal
deleted
inserted
replaced
23117:13247082e0ed | 23118:d311287a03a6 |
---|---|
109 (if (null library) | 109 (if (null library) |
110 (error "Don't know where `%s' is defined" symbol)) | 110 (error "Don't know where `%s' is defined" symbol)) |
111 (if (string-match "\\.el\\(c\\)\\'" library) | 111 (if (string-match "\\.el\\(c\\)\\'" library) |
112 (setq library (substring library 0 (match-beginning 1)))) | 112 (setq library (substring library 0 (match-beginning 1)))) |
113 (let* ((path find-function-source-path) | 113 (let* ((path find-function-source-path) |
114 (compression (or (rassq 'jka-compr-handler file-name-handler-alist) | |
115 (member 'crypt-find-file-hook find-file-hooks))) | |
114 (filename (if (and (file-exists-p library) | 116 (filename (if (and (file-exists-p library) |
115 (not (file-directory-p library))) | 117 (not (file-directory-p library))) |
116 library | 118 library |
117 ;; use `file-name-sans-extension' here? (if it gets fixed) | 119 ;; use `file-name-sans-extension' here? (if it gets fixed) |
118 (if (string-match "\\(\\.el\\)\\'" library) | 120 (if (string-match "\\(\\.el\\)\\'" library) |
119 (setq library (substring library 0 | 121 (setq library (substring library 0 |
120 (match-beginning 1)))) | 122 (match-beginning 1)))) |
121 (or (locate-library (concat library ".el") t path) | 123 (or (locate-library (concat library ".el") t path) |
122 (locate-library library t path))))) | 124 (locate-library library t path) |
125 (if compression | |
126 (or (locate-library (concat library ".el.gz") | |
127 t path) | |
128 (locate-library (concat library ".gz") | |
129 t path))))))) | |
123 (if (not filename) | 130 (if (not filename) |
124 (error "The library \"%s\" is not in the path." library)) | 131 (error "The library \"%s\" is not in the path." library)) |
125 (with-current-buffer (find-file-noselect filename) | 132 (with-current-buffer (find-file-noselect filename) |
126 (save-match-data | 133 (save-match-data |
127 (let ((regexp (format (if variable-p | 134 (let ((regexp (format (if variable-p |