Mercurial > emacs
changeset 48992:1e54c94f1eca
* cus-dep.el (generated-custom-dependencies-file): New variable.
(custom-make-dependencies): Use it instead of hardcoding
cus-load.el.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sun, 29 Dec 2002 17:59:23 +0000 |
parents | d3a44c8bd8d2 |
children | b23fb6dc0915 |
files | lisp/cus-dep.el |
diffstat | 1 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cus-dep.el Sun Dec 29 17:59:00 2002 +0000 +++ b/lisp/cus-dep.el Sun Dec 29 17:59:23 2002 +0000 @@ -30,6 +30,9 @@ (require 'widget) (require 'cus-face) +(defvar generated-custom-dependencies-file "cus-load.el" + "File \\[cusom-make-dependencies] puts custom dependencies into.") + (defun custom-make-dependencies () "Batch function to extract custom dependencies from .el files. Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" @@ -73,11 +76,12 @@ (put (nth 1 expr) 'custom-where name)) (error nil)))) (error nil)))))))) - (message "Generating cus-load.el...") - (set-buffer (find-file-noselect "cus-load.el")) + (message "Generating %s..." generated-custom-dependencies-file) + (set-buffer (find-file-noselect generated-custom-dependencies-file)) (erase-buffer) (insert "\ -;;; cus-load.el --- automatically extracted custom dependencies +;;; " (file-name-nondirectory generated-custom-dependencies-file) + " --- automatically extracted custom dependencies ;; ;;; Code: @@ -120,7 +124,8 @@ ;;; This macro is used so we don't modify the information about ;;; variables and groups if it's already set. (We don't know when -;;; cus-load.el is going to be loaded and at that time some of the +;;; " (file-name-nondirectory generated-custom-dependencies-file) + " is going to be loaded and at that time some of the ;;; files might be loaded and some others might not). \(defmacro custom-put-if-not (symbol propname value) `(unless (get ,symbol ,propname) @@ -161,17 +166,18 @@ (insert "\ -\(provide 'cus-load) +\(provide '" (file-name-sans-extension + (file-name-nondirectory generated-custom-dependencies-file)) ") ;;; Local Variables: ;;; version-control: never ;;; no-byte-compile: t ;;; no-update-autoloads: t ;;; End: -;;; cus-load.el ends here\n") +;;; " (file-name-nondirectory generated-custom-dependencies-file) " ends here\n") (let ((kept-new-versions 10000000)) (save-buffer)) - (message "Generating cus-load.el...done") + (message "Generating %s...done" generated-custom-dependencies-file) (kill-emacs))