Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / lisp / cus-dep.el
index e49d86a..23f3eac 100644 (file)
@@ -1,10 +1,10 @@
 ;;; cus-dep.el --- find customization dependencies
 ;;
-;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008  Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2012  Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: internal
+;; Package: emacs
 
 ;; This file is part of GNU Emacs.
 
@@ -42,9 +42,12 @@ ldefs-boot\\|cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)"
 (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"
-  (let ((enable-local-eval nil))
+  (let ((enable-local-eval nil)
+       subdir)
     (with-temp-buffer
-      (dolist (subdir command-line-args-left)
+      ;; Use up command-line-args-left else Emacs can try to open
+      ;; the args as directories after we are done.
+      (while (setq subdir (pop command-line-args-left))
         (message "Directory %s" subdir)
         (let ((files (directory-files subdir nil "\\`[^=].*\\.el\\'"))
               (default-directory (expand-file-name subdir))
@@ -87,7 +90,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
   (setq buffer-undo-list t)
   (erase-buffer)
   (insert (autoload-rubric generated-custom-dependencies-file
-                           "custom dependencies"))
+                           "custom dependencies" t))
   (search-backward "\f")
   (mapatoms (lambda (symbol)
              (let ((members (get symbol 'custom-group))
@@ -171,5 +174,4 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
 
 \f
 
-;; arch-tag: b7b6421a-bf7a-44fd-a382-6f44976bdf68
 ;;; cus-dep.el ends here