unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* generic-x needs to require generic
@ 2005-03-21 21:07 Luc Teirlinck
  2005-03-22  8:22 ` Lute Kamstra
  0 siblings, 1 reply; 5+ messages in thread
From: Luc Teirlinck @ 2005-03-21 21:07 UTC (permalink / raw)
  Cc: emacs-devel

What is the purpose of the following change to generic-x, which breaks
bootstrapping:

	* generic-x.el: Don't prevent compilation.  Don't require generic.
	Follow coding conventions.  Minor code cleanup.

I am referring to the "Don't require generic." part.  Undoing that
part solves the following problem during bootstrapping:

generic-x.el:767:8:Error: Symbol's function definition is void:
generic-make-keywords-list
make[1]: *** [compile] Error 1
make[1]: Leaving directory `/home/teirllm/emacscvsdir/emacs/lisp'
make: *** [bootstrap-build] Error 2

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: generic-x needs to require generic
  2005-03-21 21:07 generic-x needs to require generic Luc Teirlinck
@ 2005-03-22  8:22 ` Lute Kamstra
  2005-03-22 15:36   ` Lute Kamstra
  0 siblings, 1 reply; 5+ messages in thread
From: Lute Kamstra @ 2005-03-22  8:22 UTC (permalink / raw)
  Cc: emacs-devel

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> What is the purpose of the following change to generic-x, which breaks
> bootstrapping:
>
> 	* generic-x.el: Don't prevent compilation.  Don't require generic.
> 	Follow coding conventions.  Minor code cleanup.
>
> I am referring to the "Don't require generic." part.  Undoing that
> part solves the following problem during bootstrapping:

The function generic-make-keywords-list that is called in generic-x is
defined in generic. So it should probably be autoloaded.
Alternatively generic-x could (eval-when-compile (require 'generic))
and (eval-when-compile ...) all calls to generic-make-keywords-list as
well.

I missed this because bootstrapping my working-tree worked just fine.
I also did an update for another tree without the generic{,-x}.el
patches and it bootstrapped fine.  A clean checkout fails to
bootstraps however.

This is quite strange.  I guess that for me the define-generic-mode
calls in generic-x that precede the generic-make-keywords-list call
autoload generic so that generic is loaded when the call to
generic-make-keywords-list is compiled.  Why this doesn't happen for
you of for a clean checkout beats me.

I'll put (require 'generic) back in for now to enable bootstrapping.

Lute.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: generic-x needs to require generic
  2005-03-22  8:22 ` Lute Kamstra
@ 2005-03-22 15:36   ` Lute Kamstra
  2005-03-22 16:44     ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Lute Kamstra @ 2005-03-22 15:36 UTC (permalink / raw)
  Cc: emacs-devel

Lute Kamstra <Lute.Kamstra.lists@xs4all.nl> writes:

> Luc Teirlinck <teirllm@dms.auburn.edu> writes:
>
>> What is the purpose of the following change to generic-x, which breaks
>> bootstrapping:
>>
>> 	* generic-x.el: Don't prevent compilation.  Don't require generic.
>> 	Follow coding conventions.  Minor code cleanup.
>>
>> I am referring to the "Don't require generic." part.  Undoing that
>> part solves the following problem during bootstrapping:
>
> The function generic-make-keywords-list that is called in generic-x is
> defined in generic. So it should probably be autoloaded.
> Alternatively generic-x could (eval-when-compile (require 'generic))
> and (eval-when-compile ...) all calls to generic-make-keywords-list as
> well.
>
> I missed this because bootstrapping my working-tree worked just fine.
> I also did an update for another tree without the generic{,-x}.el
> patches and it bootstrapped fine.  A clean checkout fails to
> bootstraps however.
>
> This is quite strange.  I guess that for me the define-generic-mode
> calls in generic-x that precede the generic-make-keywords-list call
> autoload generic so that generic is loaded when the call to
> generic-make-keywords-list is compiled.  Why this doesn't happen for
> you of for a clean checkout beats me.
>
> I'll put (require 'generic) back in for now to enable bootstrapping.

I've investigated this some more and I'm a bit puzzled.  Maybe someone
can help me.

When I remove the (require 'generic) from lisp/generic-x.el and do a
"make maintainer-clean", "./configure", and "make bootstrap", I see:

,----
| [...]
| 
| Generating autoloads for generic.el...
| Generating autoloads for generic.el...done
| 
| [...]
| 
| Compiling /soft/tmp/emacs/lisp/./generic-x.el
| 
| In toplevel form:
| generic-x.el:160:22:Warning: reference to free variable
|     `apache-conf-generic-mode'
| generic-x.el:177:22:Warning: reference to free variable
|     `apache-log-generic-mode'
| generic-x.el:191:22:Warning: reference to free variable `samba-generic-mode'
| generic-x.el:207:22:Warning: reference to free variable `fvwm-generic-mode'
| generic-x.el:233:22:Warning: reference to free variable
|     `x-resource-generic-mode'
| generic-x.el:244:22:Warning: reference to free variable `hosts-generic-mode'
| generic-x.el:255:22:Warning: reference to free variable `inf-generic-mode'
| generic-x.el:267:22:Warning: reference to free variable `ini-generic-mode'
| generic-x.el:287:22:Warning: reference to free variable `reg-generic-mode'
| generic-x.el:303:22:Warning: reference to free variable `bat-generic-mode'
| generic-x.el:444:22:Warning: reference to free variable
|     `mailagent-rules-generic-mode'
| generic-x.el:461:22:Warning: reference to free variable
|     `prototype-generic-mode'
| generic-x.el:484:22:Warning: reference to free variable `pkginfo-generic-mode'
| generic-x.el:496:22:Warning: reference to free variable
|     `javascript-generic-mode'
| generic-x.el:574:22:Warning: reference to free variable `vrml-generic-mode'
| generic-x.el:628:22:Warning: reference to free variable
|     `java-manifest-generic-mode'
| generic-x.el:648:22:Warning: reference to free variable
|     `java-properties-generic-mode'
| generic-x.el:679:22:Warning: reference to free variable `alias-generic-mode'
| generic-x.el:767:8:Error: Symbol's function definition is void: generic-make-keywords-list
| make[1]: *** [compile] Error 1
| make[1]: Leaving directory `/soft/tmp/emacs/lisp'
| make: *** [bootstrap-build] Error 2
`----

The warnings indicate that the define-generic-mode macro is not
defined when generic-x.el is compiled.  define-generic-mode is an
autoloaded macro in generic.el and it seems that autoloads for
generic.el are created.  So why isn't generic loaded when generic.el
is compiled?

What I find puzzling as well is that when I do a second "make
bootstrap" after the first failed, things just work fine:

,----
| [...]
| 
| Compiling /soft/tmp/emacs/lisp/./generic-x.el
| 
| In end of data:
| generic-x.el:1821:1:Warning: the following functions are not known to be
|     defined: w32-shell-name, comint-mode, comint-exec
| Wrote /soft/tmp/emacs/lisp/generic-x.elc
| 
| [...]
`----


Lute.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: generic-x needs to require generic
  2005-03-22 15:36   ` Lute Kamstra
@ 2005-03-22 16:44     ` Andreas Schwab
  2005-03-22 17:23       ` Lute Kamstra
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2005-03-22 16:44 UTC (permalink / raw)
  Cc: Luc Teirlinck, emacs-devel

Lute Kamstra <Lute.Kamstra.lists@xs4all.nl> writes:

> The warnings indicate that the define-generic-mode macro is not
> defined when generic-x.el is compiled.  define-generic-mode is an
> autoloaded macro in generic.el and it seems that autoloads for
> generic.el are created.  So why isn't generic loaded when generic.el
> is compiled?

Because bootstrap-emacs does not have the newest autoloads preloaded, but
rather the old ones from ldefs-boot.el.

> What I find puzzling as well is that when I do a second "make
> bootstrap" after the first failed, things just work fine:

Try removing lisp/loaddefs.el first.

I've now updated lips/ldefs-boot.el and removed the require from
generic-x.el again.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: generic-x needs to require generic
  2005-03-22 16:44     ` Andreas Schwab
@ 2005-03-22 17:23       ` Lute Kamstra
  0 siblings, 0 replies; 5+ messages in thread
From: Lute Kamstra @ 2005-03-22 17:23 UTC (permalink / raw)
  Cc: Luc Teirlinck, emacs-devel

Andreas Schwab <schwab@suse.de> writes:

[...]

> Because bootstrap-emacs does not have the newest autoloads
> preloaded, but rather the old ones from ldefs-boot.el.

I see.  Tricky stuff.

[...]

> I've now updated lips/ldefs-boot.el and removed the require from
> generic-x.el again.

Thanks!

Lute.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-03-22 17:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-21 21:07 generic-x needs to require generic Luc Teirlinck
2005-03-22  8:22 ` Lute Kamstra
2005-03-22 15:36   ` Lute Kamstra
2005-03-22 16:44     ` Andreas Schwab
2005-03-22 17:23       ` Lute Kamstra

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).