diff options
| author | Glenn Morris | 2012-11-02 18:44:38 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-11-02 18:44:38 -0400 |
| commit | 00a3b041730e178fe68850b76ac4216af62ea606 (patch) | |
| tree | 6eef4c5f4b9596544f4eaade0a5376fe321666b2 | |
| parent | 11fef14abb1fdd7424295c3c50d59bf18bb6c4e7 (diff) | |
| download | emacs-00a3b041730e178fe68850b76ac4216af62ea606.tar.gz emacs-00a3b041730e178fe68850b76ac4216af62ea606.zip | |
No need for filecache.el to load find-lisp when compiling
* lisp/filecache.el (find-lisp-find-files): Autoload it.
(file-cache-add-directory-recursively): Don't require find-lisp.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/filecache.el | 25 |
2 files changed, 15 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a6c9482c5aa..e4e35a74a45 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2012-11-02 Glenn Morris <rgm@gnu.org> | 1 | 2012-11-02 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * filecache.el: No need to load find-lisp when compiling. | ||
| 4 | (find-lisp-find-files): Autoload it. | ||
| 5 | (file-cache-add-directory-recursively): Don't require find-lisp. | ||
| 6 | |||
| 3 | * image.el (image-type-from-file-name): Trivial simplification. | 7 | * image.el (image-type-from-file-name): Trivial simplification. |
| 4 | 8 | ||
| 5 | * emacs-lisp/bytecomp.el (byte-compile-eval): | 9 | * emacs-lisp/bytecomp.el (byte-compile-eval): |
diff --git a/lisp/filecache.el b/lisp/filecache.el index 10e23bddca2..2dd7c2673bf 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el | |||
| @@ -139,9 +139,6 @@ | |||
| 139 | 139 | ||
| 140 | ;;; Code: | 140 | ;;; Code: |
| 141 | 141 | ||
| 142 | (eval-when-compile | ||
| 143 | (require 'find-lisp)) | ||
| 144 | |||
| 145 | (defgroup file-cache nil | 142 | (defgroup file-cache nil |
| 146 | "Find files using a pre-loaded cache." | 143 | "Find files using a pre-loaded cache." |
| 147 | :group 'files | 144 | :group 'files |
| @@ -366,6 +363,8 @@ STRING is passed as an argument to the locate command." | |||
| 366 | string) | 363 | string) |
| 367 | (file-cache-add-from-file-cache-buffer)) | 364 | (file-cache-add-from-file-cache-buffer)) |
| 368 | 365 | ||
| 366 | (autoload 'find-lisp-find-files "find-lisp") | ||
| 367 | |||
| 369 | ;;;###autoload | 368 | ;;;###autoload |
| 370 | (defun file-cache-add-directory-recursively (dir &optional regexp) | 369 | (defun file-cache-add-directory-recursively (dir &optional regexp) |
| 371 | "Adds DIR and any subdirectories to the file-cache. | 370 | "Adds DIR and any subdirectories to the file-cache. |
| @@ -374,18 +373,16 @@ If the optional REGEXP argument is non-nil, only files which match it | |||
| 374 | will be added to the cache. Note that the REGEXP is applied to the | 373 | will be added to the cache. Note that the REGEXP is applied to the |
| 375 | files in each directory, not to the directory list itself." | 374 | files in each directory, not to the directory list itself." |
| 376 | (interactive "DAdd directory: ") | 375 | (interactive "DAdd directory: ") |
| 377 | (require 'find-lisp) | ||
| 378 | (mapcar | 376 | (mapcar |
| 379 | (function | 377 | (lambda (file) |
| 380 | (lambda (file) | 378 | (or (file-directory-p file) |
| 381 | (or (file-directory-p file) | 379 | (let (filtered) |
| 382 | (let (filtered) | 380 | (dolist (regexp file-cache-filter-regexps) |
| 383 | (dolist (regexp file-cache-filter-regexps) | 381 | (and (string-match regexp file) |
| 384 | (and (string-match regexp file) | 382 | (setq filtered t))) |
| 385 | (setq filtered t))) | 383 | filtered) |
| 386 | filtered) | 384 | (file-cache-add-file file))) |
| 387 | (file-cache-add-file file)))) | 385 | (find-lisp-find-files dir (or regexp "^")))) |
| 388 | (find-lisp-find-files dir (if regexp regexp "^")))) | ||
| 389 | 386 | ||
| 390 | (defun file-cache-add-from-file-cache-buffer (&optional regexp) | 387 | (defun file-cache-add-from-file-cache-buffer (&optional regexp) |
| 391 | "Add any entries found in the file cache buffer. | 388 | "Add any entries found in the file cache buffer. |