aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Rost2002-11-11 15:09:13 +0000
committerMarkus Rost2002-11-11 15:09:13 +0000
commit052b70090aa65da4d37b47b75365c84cc6a26bfd (patch)
tree7f8a94569ae877090bb605559428136161d0534f
parented0d58c91f39858b5df64813336a173da93f7d80 (diff)
downloademacs-052b70090aa65da4d37b47b75365c84cc6a26bfd.tar.gz
emacs-052b70090aa65da4d37b47b75365c84cc6a26bfd.zip
Don't require 'autoload.
(custom-make-dependencies): Handle :version also for autoloaded options.
-rw-r--r--lisp/cus-dep.el17
1 files changed, 2 insertions, 15 deletions
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el
index 96303a85585..6794b196930 100644
--- a/lisp/cus-dep.el
+++ b/lisp/cus-dep.el
@@ -29,7 +29,6 @@
29(eval-when-compile (require 'cl)) 29(eval-when-compile (require 'cl))
30(require 'widget) 30(require 'widget)
31(require 'cus-face) 31(require 'cus-face)
32(require 'autoload)
33 32
34(defun custom-make-dependencies () 33(defun custom-make-dependencies ()
35 "Batch function to extract custom dependencies from .el files. 34 "Batch function to extract custom dependencies from .el files.
@@ -46,8 +45,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
46 (file-name-sans-extension 45 (file-name-sans-extension
47 (file-name-nondirectory f))) 46 (file-name-nondirectory f)))
48 preloaded-file-list) t) 47 preloaded-file-list) t)
49 "\\.el\\'")) 48 "\\.el\\'")))
50 is-autoloaded)
51 (dolist (file files) 49 (dolist (file files)
52 (when (and (file-exists-p file) 50 (when (and (file-exists-p file)
53 ;; Ignore files that are preloaded. 51 ;; Ignore files that are preloaded.
@@ -66,17 +64,11 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
66 (condition-case nil 64 (condition-case nil
67 (while (re-search-forward 65 (while (re-search-forward
68 "^(def\\(custom\\|face\\|group\\)" nil t) 66 "^(def\\(custom\\|face\\|group\\)" nil t)
69 (setq is-autoloaded nil)
70 (beginning-of-line) 67 (beginning-of-line)
71 (save-excursion
72 (forward-line -1)
73 (if (looking-at generate-autoload-cookie)
74 (setq is-autoloaded t)))
75 (let ((expr (read (current-buffer)))) 68 (let ((expr (read (current-buffer))))
76 (condition-case nil 69 (condition-case nil
77 (let ((custom-dont-initialize t)) 70 (let ((custom-dont-initialize t))
78 (eval expr) 71 (eval expr)
79 (put (nth 1 expr) 'custom-autoloaded is-autoloaded)
80 (put (nth 1 expr) 'custom-where name)) 72 (put (nth 1 expr) 'custom-where name))
81 (error nil)))) 73 (error nil))))
82 (error nil)))))))) 74 (error nil))))))))
@@ -140,12 +132,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
140 where) 132 where)
141 (when version 133 (when version
142 (setq where (get symbol 'custom-where)) 134 (setq where (get symbol 'custom-where))
143 (when (and where 135 (when where
144 ;; Don't bother to do anything if it's
145 ;; autoloaded because we will have all
146 ;; this info when emacs is running
147 ;; anyway.
148 (not (get symbol 'custom-autoloaded)))
149 (insert "(custom-put-if-not '" (symbol-name symbol) 136 (insert "(custom-put-if-not '" (symbol-name symbol)
150 " 'custom-version ") 137 " 'custom-version ")
151 (prin1 version (current-buffer)) 138 (prin1 version (current-buffer))