Re: [PATCH] emacs: Fix "not defined at runtime" warning
authorTomi Ollila <tomi.ollila@iki.fi>
Thu, 9 Aug 2012 07:46:56 +0000 (10:46 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:00 +0000 (09:49 -0800)
31/b9baaeef3a918c696e60bdec710485a68f5360 [new file with mode: 0644]

diff --git a/31/b9baaeef3a918c696e60bdec710485a68f5360 b/31/b9baaeef3a918c696e60bdec710485a68f5360
new file mode 100644 (file)
index 0000000..13d7482
--- /dev/null
@@ -0,0 +1,93 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id CF95F431FAF\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Aug 2012 00:46:51 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id YKHq9obJZGh9 for <notmuch@notmuchmail.org>;\r
+       Thu,  9 Aug 2012 00:46:48 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 06AB7431FAE\r
+       for <notmuch@notmuchmail.org>; Thu,  9 Aug 2012 00:46:48 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id 8DBEE1002A4; Thu,  9 Aug 2012 10:46:56 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] emacs: Fix "not defined at runtime" warning\r
+In-Reply-To: <1344462010-5349-1-git-send-email-amdragon@mit.edu>\r
+References: <1344462010-5349-1-git-send-email-amdragon@mit.edu>\r
+User-Agent: Notmuch/0.13.2+128~g07453d8 (http://notmuchmail.org) Emacs/23.1.1\r
+       (x86_64-redhat-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Thu, 09 Aug 2012 10:46:56 +0300\r
+Message-ID: <m2628scxsf.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 09 Aug 2012 07:46:52 -0000\r
+\r
+On Thu, Aug 09 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
+\r
+> Previously, the Emacs byte compiler produced the warning\r
+>\r
+>     the function `remove-if-not' might not be defined at runtime.\r
+>\r
+> because we only required cl at compile-time (not runtime).  This fixes\r
+> this warning by requiring cl at runtime, ensuring that the definition\r
+> of remove-if-not is available.\r
+> ---\r
+\r
+LGTM. \r
+\r
+It took me a while to understand this. Now I just don't understand\r
+how did this work before. And why (require 'cl) is enough as \r
+remove-if-not is defined in cl-seq.el -- cl-seq.el requires cl\r
+but not vice-versa -- or at least I don't see that. Anyway\r
+(require 'cl) is the common way.\r
+\r
+Tomi\r
+\r
+>  emacs/notmuch-lib.el |    2 +-\r
+>  1 file changed, 1 insertion(+), 1 deletion(-)\r
+>\r
+> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+> index 30db58f..900235b 100644\r
+> --- a/emacs/notmuch-lib.el\r
+> +++ b/emacs/notmuch-lib.el\r
+> @@ -24,7 +24,7 @@\r
+>  (require 'mm-view)\r
+>  (require 'mm-decode)\r
+>  (require 'json)\r
+> -(eval-when-compile (require 'cl))\r
+> +(require 'cl)\r
+>  \r
+>  (defvar notmuch-command "notmuch"\r
+>    "Command to run the notmuch binary.")\r
+> -- \r
+> 1.7.10\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r