emacs-devel
[Top][All Lists]
Advanced

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

Re: gdb-ui.el assumes images support


From: Kevin Rodgers
Subject: Re: gdb-ui.el assumes images support
Date: Tue, 09 Nov 2004 10:55:32 -0700
User-agent: Mozilla Thunderbird 0.8 (X11/20040916)

Kim F. Storm wrote:
> Kevin Rodgers <address@hidden> writes:
> > Kim F. Storm wrote:
> > > 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)
>  ;;;#autoload
>  (defun a-fun1 ()
>    (b-fun))
>  (defun a-fun2 ()
>    t)
>  (provide 'a)
>
> file b.el has this:
>  (defun b-fun ()
>     (a-fun2))
>  (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'

I think that is why Common Lisp recommends putting (provide 'feature)
first rather than last; but (provide 'feature) is last in Emacs Lisp
files to support the unload-feature command.

> What if
>
> (defun a-fun2)
>
> would be a dummy defun for the byte-compiler just like
>
> (defvar a-var)
>
> ?

That seems natural to me.

--
Kevin Rodgers





reply via email to

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