help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: (require ...) and file dependencies.


From: Dmitry Gutov
Subject: Re: (require ...) and file dependencies.
Date: Sun, 28 Dec 2014 02:09:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0

On 12/28/2014 01:42 AM, Oleksandr Gavenko wrote:

But what to do with:

   Warning: the function `...' is not known to be defined.

I have:

   xxx-mode.el
   xxx-update.el

and both files mix uses of variables and functions. "xxx-mode.el" have

   (require 'xxx-update)

and designed to be loaded by user. So "xxx-update.el" can't use

   (require 'xxx-mode)

or you get:

   Error: Recursive `require' for feature `xxx-mode'

You can use `declare-function' in this case. And then make sure than the other package is actually loaded at runtime.

Seems that proper way to fix issue is by rearranging dependency hierarchy by
breaking dependency cycles, isn't?

That would be even better, of course.



reply via email to

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