aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2002-12-29 17:59:23 +0000
committerAndreas Schwab2002-12-29 17:59:23 +0000
commitb1d7940fae8e6cd067e2c2f9bb6ba31ec400b122 (patch)
treed3a42f67a25b0ab1bf07038aa738e8066962c7fb
parent9bd0d71aa9fff59f19fdef0bd0092d371d0297ca (diff)
downloademacs-b1d7940fae8e6cd067e2c2f9bb6ba31ec400b122.tar.gz
emacs-b1d7940fae8e6cd067e2c2f9bb6ba31ec400b122.zip
* cus-dep.el (generated-custom-dependencies-file): New variable.
(custom-make-dependencies): Use it instead of hardcoding cus-load.el.
-rw-r--r--lisp/cus-dep.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el
index b923dfcbacd..aeec07ae4f0 100644
--- a/lisp/cus-dep.el
+++ b/lisp/cus-dep.el
@@ -30,6 +30,9 @@
30(require 'widget) 30(require 'widget)
31(require 'cus-face) 31(require 'cus-face)
32 32
33(defvar generated-custom-dependencies-file "cus-load.el"
34 "File \\[cusom-make-dependencies] puts custom dependencies into.")
35
33(defun custom-make-dependencies () 36(defun custom-make-dependencies ()
34 "Batch function to extract custom dependencies from .el files. 37 "Batch function to extract custom dependencies from .el files.
35Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" 38Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
@@ -73,11 +76,12 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
73 (put (nth 1 expr) 'custom-where name)) 76 (put (nth 1 expr) 'custom-where name))
74 (error nil)))) 77 (error nil))))
75 (error nil)))))))) 78 (error nil))))))))
76 (message "Generating cus-load.el...") 79 (message "Generating %s..." generated-custom-dependencies-file)
77 (set-buffer (find-file-noselect "cus-load.el")) 80 (set-buffer (find-file-noselect generated-custom-dependencies-file))
78 (erase-buffer) 81 (erase-buffer)
79 (insert "\ 82 (insert "\
80;;; cus-load.el --- automatically extracted custom dependencies 83;;; " (file-name-nondirectory generated-custom-dependencies-file)
84 " --- automatically extracted custom dependencies
81;; 85;;
82;;; Code: 86;;; Code:
83 87
@@ -120,7 +124,8 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
120 124
121;;; This macro is used so we don't modify the information about 125;;; This macro is used so we don't modify the information about
122;;; variables and groups if it's already set. (We don't know when 126;;; variables and groups if it's already set. (We don't know when
123;;; cus-load.el is going to be loaded and at that time some of the 127;;; " (file-name-nondirectory generated-custom-dependencies-file)
128 " is going to be loaded and at that time some of the
124;;; files might be loaded and some others might not). 129;;; files might be loaded and some others might not).
125\(defmacro custom-put-if-not (symbol propname value) 130\(defmacro custom-put-if-not (symbol propname value)
126 `(unless (get ,symbol ,propname) 131 `(unless (get ,symbol ,propname)
@@ -161,17 +166,18 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
161 166
162 (insert "\ 167 (insert "\
163 168
164\(provide 'cus-load) 169\(provide '" (file-name-sans-extension
170 (file-name-nondirectory generated-custom-dependencies-file)) ")
165 171
166;;; Local Variables: 172;;; Local Variables:
167;;; version-control: never 173;;; version-control: never
168;;; no-byte-compile: t 174;;; no-byte-compile: t
169;;; no-update-autoloads: t 175;;; no-update-autoloads: t
170;;; End: 176;;; End:
171;;; cus-load.el ends here\n") 177;;; " (file-name-nondirectory generated-custom-dependencies-file) " ends here\n")
172 (let ((kept-new-versions 10000000)) 178 (let ((kept-new-versions 10000000))
173 (save-buffer)) 179 (save-buffer))
174 (message "Generating cus-load.el...done") 180 (message "Generating %s...done" generated-custom-dependencies-file)
175 (kill-emacs)) 181 (kill-emacs))
176 182
177 183