The following functions should be used with care. Often complex lisp
packages (like eieio) contain eval-when-compile forms which, when executed,
break functionality. So when you byte compile such packages you need to
restart emacs.... just type M-x compile-all-lisp or
compile-all-lisp-skipping-errors.
Hope this helps
-b
(defun apply-to-all (command &optional dir regexp)
"apply a command or function to every file in the directory and
sub-directories specified that match the regexp"
(let* ((directory (if (null dir) default-directory dir))
(files (directory-files directory t "[a-zA-Z]+"))
(file (car files)))
(while (not (null file))
(if (file-directory-p file)
(apply-to-all command file regexp)
(if (or (null regexp)
(string-match regexp file))
(if (functionp command)
(funcall command file)
(shell-command (concat command " " file) (concat "*" command
"-output*") (concat "*" command "-error*"))
)
)
)
(setq files (cdr files))
(setq file (car files))
)
)
)
(defun safe-byte-compile (filename)
"throws an error if the byte compile fails"
(if (not (byte-compile-file filename))
(error (concat "error compiling file" filename))))
(defun compile-all-lisp-skipping-errors (&optional directory)
"compiles all the lisp files recursivly in a directory, does not stop for
errors"
(interactive "Ddirectory to byte-compile")
(if (null directory)
(setq directory default-directory))
(apply-to-all 'byte-compile-file directory emacs-lisp-file-regexp)
)
(defun compile-all-lisp (&optional directory)
"compiles all the lisp files recursivly in a directory, stoping at the
first error"
(interactive "Ddirectory to byte-compile")
(if (null directory)
(setq directory default-directory))
(apply-to-all 'safe-byte-compile directory emacs-lisp-file-regexp)
)
-b
----- Original Message -----
From: "Roland" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 18, 2002 4:59 PM
Subject: How do I byte-compile without using make?
> Hello,
>
> I managed to bytecompile the jde files with the built-in compile command.
> But about the ther tools like eieio? I'm on Windows NT, is there a way to
> compile those without using the make file?
>
> Roland
>
>