(vc-register): Allow registering a file passed as a
[bpt/emacs.git] / lisp / cus-dep.el
index af21c2c..815e2d4 100644 (file)
@@ -1,6 +1,7 @@
 ;;; cus-dep.el --- find customization dependencies
 ;;
-;; Copyright (C) 1997, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005,
+;;   2006, 2007 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: internal
@@ -9,7 +10,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -31,7 +32,7 @@
 (require 'cus-face)
 
 (defvar generated-custom-dependencies-file "cus-load.el"
-  "File \\[cusom-make-dependencies] puts custom dependencies into.")
+  "Output file for \\[custom-make-dependencies].")
 
 (defun custom-make-dependencies ()
   "Batch function to extract custom dependencies from .el files.
@@ -98,8 +99,8 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
                  (when found
                    (insert "(put '" (symbol-name symbol)
                             " 'custom-loads '")
-                    (prin1 found (current-buffer))
-                    (insert "))\n"))))))
+                    (prin1 (nreverse found) (current-buffer))
+                    (insert ")\n"))))))
   (insert "\
 ;; These are for handling :version.  We need to have a minimum of
 ;; information so `customize-changed-options' could do its job.
@@ -140,7 +141,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
                                    (member where
                                            (cdr (assoc version version-alist)))
                                  (push where (cdr (assoc version version-alist))))
-                             (push (cons version (list where)) version-alist)))
+                             (push (list version where) version-alist)))
                        ;; This is a group
                        (insert "(custom-put-if-not '" (symbol-name symbol)
                                " 'custom-version ")