+;; #### i created the following. this one and the last should be merged into
+;; batch-update-autoloads and batch-update-one-directory. --ben
+
+;;;###autoload
+(defun batch-update-one-directory ()
+ "Update the autoloads for a single directory on the command line.
+Runs `update-file-autoloads' on each file in the given directory, and must
+be used only with -batch."
+ (unless noninteractive
+ (error "batch-update-directory is to be used only with -batch"))
+ (let ((defdir default-directory)
+ (enable-local-eval nil)) ; Don't query in batch mode.
+ (let ((arg (car command-line-args-left)))
+ (setq command-line-args-left (cdr command-line-args-left))
+ (setq arg (expand-file-name arg defdir))
+ (let ((generated-autoload-file (expand-file-name autoload-file-name
+ arg)))
+ (cond
+ ((file-directory-p arg)
+ (message "Updating autoloads in directory %s..." arg)
+ (update-autoloads-from-directory arg))
+ (t (error "No such file or directory: %s" arg)))
+ (fixup-autoload-buffer (concat (if autoload-package-name
+ autoload-package-name
+ (file-name-nondirectory arg))
+ "-autoloads"))
+ (save-some-buffers t))
+ ;; (message "Done")
+ )))
+