[comp.emacs] Compiling cl.el

quiroz@cs.rochester.edu (Cesar Quiroz) (05/19/88)

A couple of posters have mentioned they had trouble recompiling
cl.el.  (dgy@sigmast, anderson@cme-durer.arpa).  I suspect the
problem is more general than that.

From the comments at the beginning of the file:

;;;; To compile this file, make sure you load it first.  This is
;;;; because many things are implemented as macros and now that all
;;;; the files are concatenated together one cannot ensure that
;;;; declaration always precedes use.

The warning is still in effect.  In addition to the reason given
above, you might have loaded another package that defines a
function or macro from cl.el in ways incompatible with common usage,
thus breaking cl.el.  (Also:  you need a byte compiler older
than the one in v17.64, or else in won't work anyway.  However, I
don't think anyone received a copy of cl.el before early release
18.)

Please report problems like the above to me.

Cesar

-- 
Cesar Augusto Quiroz Gonzalez
Department of Computer Science     ...allegra!rochester!quiroz
University of Rochester            or
Rochester,  NY 14627               quiroz@cs.rochester.edu

jr@bbn.com (John Robinson) (05/20/88)

Now that we have been around so much on this one, maybe it is time to
solicit a volunteer to rewrite byte-compile.el to be a two-pass
compiler: one pass to find and execute defmacro's and another to
compile everything.  Would this be enough?
-- 
/jr
jr@bbn.com or bbn!jr

quiroz@cs.rochester.edu (Cesar Quiroz) (07/09/88)

Many people have reported trouble compiling cl.el after upgrading.
The reason is explained in the comments at the beginning of the file:

    ;;;; To compile this file, make sure you load it first.  This is
    ;;;; because many things are implemented as macros and now that all
    ;;;; the files are concatenated together one cannot ensure that
    ;;;; declaration always precedes use.

The solution is just to load the file before running a
byte-compile-file on it.  Of course, this is not the best way of
going about doing things (the user need not know about this), but
practical considerations demand not to complicate too much the lisp
library for Emacs--which would happen if cl.el were split again.

If someone volunteers to teach the interpreter and the compiler
about `eval-when', I will provide a more permanent patch:

    ;;; First form in the file:
    (eval-when (compile)
        (if (not (featurep 'cl))
            (load-file "cl.el"))) ; would (require 'cl) be enough?

Thanks to all the people who have reported this problem.  And keep
the list informed of any such in the future.


-- 
Cesar Augusto Quiroz Gonzalez
Department of Computer Science     ...allegra!rochester!quiroz
University of Rochester            or
Rochester,  NY 14627               quiroz@cs.rochester.edu