From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Emacs 25.0.94: Is require failing to define macros and functions at compile time? Date: Wed, 29 Jun 2016 10:55:22 -0400 Message-ID: Reply-To: rswgnu@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1467212194 11388 80.91.229.3 (29 Jun 2016 14:56:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2016 14:56:34 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 29 16:56:34 2016 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 1bIGum-00063f-JG for ged-emacs-devel@m.gmane.org; Wed, 29 Jun 2016 16:56:32 +0200 Original-Received: from localhost ([::1]:44256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIGul-0007Lz-RI for ged-emacs-devel@m.gmane.org; Wed, 29 Jun 2016 10:56:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIGuE-0007Kg-PJ for emacs-devel@gnu.org; Wed, 29 Jun 2016 10:55:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIGuA-0006Hc-RS for emacs-devel@gnu.org; Wed, 29 Jun 2016 10:55:58 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIGuA-0006HW-Nh for emacs-devel@gnu.org; Wed, 29 Jun 2016 10:55:54 -0400 Original-Received: from mail-ob0-f178.google.com ([209.85.214.178]:36776) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bIGu9-0007nw-Dt for emacs-devel@gnu.org; Wed, 29 Jun 2016 10:55:53 -0400 Original-Received: by mail-ob0-f178.google.com with SMTP id mu6so29091551obc.3 for ; Wed, 29 Jun 2016 07:55:53 -0700 (PDT) X-Gm-Message-State: ALyK8tJnB89tDXCvI8IrvsYJPbppfEROXjcGjlTS+MAr9X1cl0N3EmkQD0Oxw9VOeAIOXuVxqVpeO6gVFz3GAw== X-Received: by 10.157.10.4 with SMTP id 4mr5772171otg.13.1467212152282; Wed, 29 Jun 2016 07:55:52 -0700 (PDT) Original-Received: by 10.202.212.143 with HTTP; Wed, 29 Jun 2016 07:55:22 -0700 (PDT) X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:204926 Archived-At: I have been seeing a number of problems with byte-compiling the Hyperbole package due to require statements (probably within byte-compiled files) not defining certain macros and functions needed during the compilation of the file with the require in it. If the required file is named F, then (require 'F) is insufficient but (eval-when-compile (load "F.el")) works (a load of "F" does not always work), so I am forced to add these eval-when-compile statements to the code. Has anyone seen anything similar? Most of the time the problem is with a macro definition not be defined and therefore a macro expansion fails, but sometimes I get undefined functions when I can see the function is defined within the required file and I know that the path of the file is in load-path at compile time. Sometimes the problem is with recursive requires. Has anyone seen anything similar? Isn't require supposed to be sufficient to define both macros and functions at compile time for a client library? Here is a recent example from Hyperbole: When compiling hact.el, I get: In end of data: hact.el:322:1:Warning: the following functions are not known to be defined: hhist:add At the top of hact.el is: (mapc 'require '(hhist set)) In hhist.el is: (defun hhist:add (elt) ...) Something is not happening at byte-compile time but why and what is the problem? Bob