# HG changeset patch # User Mike Sperber # Date 1335168399 -7200 # Node ID 7fa8667cdaa732afd502dd72f088e5f3d9e00478 # Parent d026b665014fda7a8d6148e8cc8fb9d046bff7f7 Imitate GNU Emacs API for `batch-byte-recompile-directory'. 2012-04-23 Michael Sperber * bytecomp.el (batch-byte-recompile-directory): Accept an optional argument that's passed on to `byte-recompile-directory' as the prefix argument, thus imitating GNU Emacs's API. diff -r d026b665014f -r 7fa8667cdaa7 lisp/ChangeLog --- a/lisp/ChangeLog Wed Apr 25 20:25:33 2012 +0100 +++ b/lisp/ChangeLog Mon Apr 23 10:06:39 2012 +0200 @@ -1,3 +1,9 @@ +2012-04-23 Michael Sperber + + * bytecomp.el (batch-byte-recompile-directory): Accept an optional + argument that's passed on to `byte-recompile-directory' as the + prefix argument, thus imitating GNU Emacs's API. + 2012-04-07 Aidan Kehoe Remove some utility functions from the global namespace, it's more diff -r d026b665014f -r 7fa8667cdaa7 lisp/bytecomp.el --- a/lisp/bytecomp.el Wed Apr 25 20:25:33 2012 +0100 +++ b/lisp/bytecomp.el Mon Apr 23 10:06:39 2012 +0200 @@ -4960,10 +4960,15 @@ (batch-byte-recompile-directory)) ;;;###autoload -(defun batch-byte-recompile-directory () +(defun batch-byte-recompile-directory (&optional arg) "Runs `byte-recompile-directory' on the dirs remaining on the command line. Must be used only with `-batch', and kills Emacs on completion. -For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'." +For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'. + +The optional argument is passed to `byte-recompile-directory' as the +prefix argument; see the documentation there for its meaing. +In particular, passing 0 means to compile files for which no `.elc' files +exist." ;; command-line-args-left is what is left of the command line (startup.el) (defvar command-line-args-left) ;Avoid 'free variable' warning (if (not noninteractive) @@ -4972,7 +4977,7 @@ (setq command-line-args-left '("."))) (let ((byte-recompile-directory-ignore-errors-p t)) (while command-line-args-left - (byte-recompile-directory (car command-line-args-left)) + (byte-recompile-directory (car command-line-args-left) arg) (setq command-line-args-left (cdr command-line-args-left)))) (kill-emacs 0))