[Top][All Lists]

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

Re: message-fetch-field vs require

From: Alan Mackenzie
Subject: Re: message-fetch-field vs require
Date: Thu, 24 Dec 2015 17:47:08 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Lars.

On Thu, Dec 24, 2015 at 06:25:21PM +0100, Lars Ingebrigtsen wrote:
> Stephen Leake <address@hidden> writes:

> > I've got a function that uses message-fetch-field. The file has (require
> > 'message). But the byte compiler still complains:

> > bzr-gnus.el:155:1:Warning: the following functions might not be defined at
> >     runtime: message-fetch-field, mm-save-part-to-file

> > I've tried wrapping the require in "eval-and-compile"; no help.

> > Can anyone explain what's going on?

> No, sounds really odd to me.  `message-fetch-field' is a totally normal
> function, so if you require `message' (and your load path points to the
> version of message.el you're really using), then this shouldn't be
> happening...

There was a bug, now fixed in the emacs-25 branch: any function defined
within an `eval-when-compile' was put on the "might not be defined at
runtime" list; even when such a function was subsequently defined for
runtine, it stayed on that list, and its use in a function being
compiled caused the warning message to be output.

My guess is that Stephen's code had an `eval-when-compile' which,
directly or indirectly, `require'd 'message.

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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