Federico Beffa <[email protected]> writes:
> What do you think about the attached implementation?
[...]
> +(define (emacs-byte-compile files)
> + "Byte compile FILES, a list of file names."
> + (if (pair? files)
> + (for-each (lambda (f)
> + (let ((expr `(let ()
> + (push ,(dirname f) load-path)
> + (byte-compile-file ,f))))
> + (emacs-batch-eval expr)))
> + files)
> + (error "emacs-byte-compile failed: not a list of files!" files)))
> +
I would prefer to let an emacs expert (Alex?) comment on this, but here
are some preliminary comments:
* I wouldn't bother checking the type of 'files', since 'for-each' will
do that. Also, () is a list but not a pair.
* Maybe use 'progn' instead of 'let ()' ?
* Instead of launching a separate emacs process for each file, how about
passing the list of filenames into emacs and do the loop within emacs
itself?
Mark