[Top][All Lists]

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

Re: gdb-ui.el assumes images support

From: Kim F. Storm
Subject: Re: gdb-ui.el assumes images support
Date: Tue, 09 Nov 2004 15:11:57 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Kevin Rodgers <address@hidden> writes:

> Kim F. Storm wrote:
>  > Nick Roberts <address@hidden> writes:
>  >>I added the last require after Gerd Moellmann included the others. My
>  >>understanding now is that a file only requires another, at compilation,
>  >>if it uses a macro defined in that other file.
>  >
>  > It may also require another file simply to avoid warnings for using
>  > undefined functions that are defined in that file.
>  >
>  > How else would you avoid such warnings?
> With (require 'feature) at the top level, since it is needed at runtime.

file a.el has this:
 (require 'b)
 (defun a-fun1 ()
 (defun a-fun2 ()
 (provide 'a)

file b.el has this:
 (defun b-fun ()
 (provide 'b)

Assuming that b is never used directly, this works fine.

Now, when you byte-compile b.el, you get warning for a-fun2.

So according to your advise, we add
  (require 'a)
to b.el, and compile again with this result:

b.el:1:2:Error: Recursive `require' for feature `a'

What if

(defun a-fun2)

would be a dummy defun for the byte-compiler just like

(defvar a-var)


Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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