Mercurial > hg > xemacs-beta
changeset 5650:7fa8667cdaa7
Imitate GNU Emacs API for `batch-byte-recompile-directory'.
2012-04-23 Michael Sperber <mike@xemacs.org>
* 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.
author | Mike Sperber <sperber@deinprogramm.de> |
---|---|
date | Mon, 23 Apr 2012 10:06:39 +0200 |
parents | d026b665014f |
children | ae2fdb1fd9e0 |
files | lisp/ChangeLog lisp/bytecomp.el |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <mike@xemacs.org> + + * 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 <kehoea@parhasard.net> Remove some utility functions from the global namespace, it's more
--- 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))