[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bootstrap fails AND how about fixing the byte-compiler?

From: Alan Mackenzie
Subject: Re: bootstrap fails AND how about fixing the byte-compiler?
Date: Wed, 16 Jan 2008 00:13:56 +0000
User-agent: Mutt/1.5.9i

Hi, David and Katsumi!

On Tue, Jan 15, 2008 at 09:03:19AM +0900, Katsumi Yamaoka wrote:
> >>>>> Alan Mackenzie wrote:

> > Log message:
> >     * progmodes/cc-vars.el (c-constant-symbol): New function which 
> > supersedes
> >     c-const-symbol.  During a customize-.. call it enables an element of
> >     (e.g.) c-hanging-braces alist to have its name displayed, even when the
> >     default value of c-h-b etc. doesn't include the elemnt.  Replace uses of
> >     the old function by the new.

> By this change Emacs bootstrap fails.  The `c-constant-symbol'
> function seems to have to be surrounded by `eval-and-compile'.

> Regards,

[David wrote basically the same in a separate post, to which I'm
responding here.]

Sorry about the hassle in cc-vars.el.

I'm assuming that it's the trunk (not the Emacs-22 branch) where people
have been having trouble.

OK, I can't reproduce this right at the moment.  I haven't built Emacs
for some time, and I'm in bootstrap-hell - it keeps telling me that
such-and-such a function/variable isn't defined, and I'm going through
knocking them out one by one.  On doing

    % ./configure --with-gif=no --with-tiff=no
    % time make bootstrap

, the latest error message I've get is:

    Symbol's value as variable is void: input-decode-map

It would be really nice if this process just worked, and carried on
working (yeah I know, I'm one of the people who's broken it ;-).  It
never seems to work for me, first time round, especially if I haven't
built Emacs for some time.  make bootstrap _is_ supposed to work from
raw source, regardless of whatever rubbish is cluttering up the file
tree, isn't it?
Anyhow, back to cc-vars.el:  I can reproduce the problem with:

    % emacs -Q -batch -f batch-byte-compile cc-vars.el

c-constant-symbol is defun'd at cc-vars.el L77.  It is used inside a
backquote expression like this: `( ..... ,(c-constant-symbol elt 20) ..).

It seems ludicrous that the byte-compiler needs an `eval-and-compile'
round the (defun c-constant-symbol ...) form.  I detest cluttering up
source code.  Is there any good reason for the b-c not to maintain an
obarray of its own symbols during compilation?  Surely, the byte
compiler should be able to compile anything that eval-buffer can?

Anyhow, it seems the best solution for cc-vars.el right now (after all,
it's got to work with Emacs 2[01] and various flavours of XEmacs, too),
is to change c-constant-symbol into a macro.  

[ 2 hours later. ]   No, macros don't seem to be recorded in the symbol
table during byte compilation either.  Doubleplus Ungood.  So it looks
like it'll have to be eval-and-compile after all.  YUCK!!!

I've committed this fix in the trunk.  I'll do the same in the Emacs-22
branch later.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]