From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: message-fetch-field vs require Date: Thu, 24 Dec 2015 17:47:08 +0000 Message-ID: <20151224174708.GB2397@acm.fritz.box> References: <86615aet2v.fsf@stephe-leake.org> <87ziwzsqri.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1450979122 30114 80.91.229.3 (24 Dec 2015 17:45:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Dec 2015 17:45:22 +0000 (UTC) Cc: Stephen Leake , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 24 18:45:12 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aC9ws-0000gK-8p for ged-emacs-devel@m.gmane.org; Thu, 24 Dec 2015 18:45:10 +0100 Original-Received: from localhost ([::1]:32885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aC9wr-0005eV-LJ for ged-emacs-devel@m.gmane.org; Thu, 24 Dec 2015 12:45:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aC9we-0005eD-Li for emacs-devel@gnu.org; Thu, 24 Dec 2015 12:44:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aC9wb-0001wv-9f for emacs-devel@gnu.org; Thu, 24 Dec 2015 12:44:56 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:32151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aC9wb-0001we-09 for emacs-devel@gnu.org; Thu, 24 Dec 2015 12:44:53 -0500 Original-Received: (qmail 16503 invoked by uid 3782); 24 Dec 2015 17:44:50 -0000 Original-Received: from acm.muc.de (p548A5291.dip0.t-ipconnect.de [84.138.82.145]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 24 Dec 2015 18:44:49 +0100 Original-Received: (qmail 5579 invoked by uid 1000); 24 Dec 2015 17:47:08 -0000 Content-Disposition: inline In-Reply-To: <87ziwzsqri.fsf@gnus.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196777 Archived-At: Hello, Lars. On Thu, Dec 24, 2015 at 06:25:21PM +0100, Lars Ingebrigtsen wrote: > Stephen Leake 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).