From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: eval-when-compile and require Date: Thu, 23 Nov 2017 06:25:50 +0100 Message-ID: <868textvkx.fsf@zoho.com> References: <86o9nwwa37.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1511414795 28227 195.159.176.226 (23 Nov 2017 05:26:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Nov 2017 05:26:35 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 23 06:26:31 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHk1s-0006w5-Mo for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Nov 2017 06:26:28 +0100 Original-Received: from localhost ([::1]:42594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHk20-0003Qj-0f for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Nov 2017 00:26:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHk1Y-0003Qe-Ax for help-gnu-emacs@gnu.org; Thu, 23 Nov 2017 00:26:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHk1V-000799-5I for help-gnu-emacs@gnu.org; Thu, 23 Nov 2017 00:26:08 -0500 Original-Received: from [195.159.176.226] (port=49641 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eHk1U-00076j-Ux for help-gnu-emacs@gnu.org; Thu, 23 Nov 2017 00:26:05 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eHk1H-0004if-Qa for help-gnu-emacs@gnu.org; Thu, 23 Nov 2017 06:25:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 65 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:Y0Zvo7GczXeZoUjyV76Z/+jETw8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115068 Archived-At: (Oups - I mistakenly sent this to gnu.emacs.help instead of here, gmane.emacs.help . Everyone should get it anyway, but the operative word being "should", I resend it here as well.) Stefan Monnier wrote: >> (eval-when-compile (require 'foo)) >> [...] (info "(elisp) Warning Tips") > > I suggest you M-x report-emacs-bug, since > that doc is incorrect (you'll still get > warnings along the lines of "those functions > are not known to be defined at runtime"). Close! Actually it says "might not be defined at runtime" :) And it only mentions `cl-find-if' - not `cl-caddr' or `cl-case' (?). Perhaps they have some different status or location within the CL library? Also, looking at the fallout below, is it likely that `eval-and-compile' (N.B. -and-, not -when-) is what they meant in (info "(elisp) Warning Tips") ? Here is the compilation function: #! /bin/zsh compile-one () { local file=$1 emacs -Q -batch -f batch-byte-compile $file } Using functions form `cl-lib', and not doing anything about it: In end of data: wrap-search-cp.el:133:1:Warning: the following functions are not known to be defined: cl-find-if, cl-caddr, cl-case using (require 'cl-lib) no errors or warnings using (eval-when-compile (require 'cl-lib)) In end of data: wrap-search-cp.el:133:1:Warning: the function `cl-find-if' might not be defined at runtime. using (eval-and-compile (require 'cl-lib)) no errors or warnings -- underground experts united http://user.it.uu.se/~embe8573