Path: utzoo!attcan!uunet!husc6!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: comp.emacs,gnu.emacs Subject: Re: byte-compile errors in cl.el for 18.51 Keywords: 18.51 byte-compile cl.el Message-ID: <26775@bbn.COM> Date: 11 Jul 88 21:38:55 GMT References: <1371@turbinia.oakhill.UUCP> Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Followup-To: comp.emacs Distribution: na Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 29 In-reply-to: abair@oakhill.UUCP (Alan Bair) In article <1371@turbinia.oakhill.UUCP>, abair@oakhill (Alan Bair) writes: >Everything worked fine until I tried to byte-compile the new or changed >lisp functions. The file cl.el fails early in the process with the >message: > Wrong type argument: symbolp, (ptr oldforms (cdr ptr)) >I looked at the code and can see nothing wrong with it, but then I'm >not a Lisp expert. Here is the code section where it dies: >... cl.el, like a few other elips libraries, makes and uses macro definitions. It won't compile right if the macros aren't defined at the time you compile it. The compiler might in principle catch this, but it doesn't. The workaround is easy - load the .el file first, then byte-compile it. In other words, in your case, M-x load-library cl.el M-x byte-compile cl.el In the code you quoted, the (do ... ) function is really a macro, but the compiler will compile code for a function call because the macro wasn't expanded as it was reading in the file (macros are expanded in the lisp reader, but the definitions happen in the evaluator, which the copmiler doesn't call since you are compiling, not loading. Got it?). This question should go onto the 10 most-asked questions list. --