From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Has eval-and-compile changed in emacs 27? Date: Thu, 25 Feb 2021 11:18:20 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7215"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Leo Liu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 25 17:19:37 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFJMW-0001lE-RG for ged-emacs-devel@m.gmane-mx.org; Thu, 25 Feb 2021 17:19:36 +0100 Original-Received: from localhost ([::1]:33304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFJMV-0004wp-N7 for ged-emacs-devel@m.gmane-mx.org; Thu, 25 Feb 2021 11:19:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFJLR-0004OK-GC for emacs-devel@gnu.org; Thu, 25 Feb 2021 11:18:29 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFJLO-0004Eh-0c for emacs-devel@gnu.org; Thu, 25 Feb 2021 11:18:28 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 18A47441842; Thu, 25 Feb 2021 11:18:23 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 78962441835; Thu, 25 Feb 2021 11:18:21 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614269901; bh=apkpQRvkSSbUI6lcfCInL6fHdB1ceotRcO0gT0/m7iI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=NjT35sqBIwIrrompL9fjtRGj6J08VSMaDaPEzcOyaMSqD6EUMm7St8p5478KnffWA bxUrFTSCeWzU6LgPiyQkeNyAMGhOsMIvFdOon40MeafTyhIl28T8qgYwa3p1i31MJF ZM0mOsXrc8DHprj0JrvUoBENMpLku6WVkFqjt48AqNEeGRGdMKHczPfbEhYVscakR6 r+dvz8/69/parZdU9yiX39lgBHHMf7jScaYwvgFnORogccIf7Yjir1rlNdHOj56XqP KpQUdYsCLnMRZYrU6TUQhFFdinVdUfyMgYWda2+S2W1K8xTAKfBz3iiv938mTlhh6U TIA6Ilj/K30DQ== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9222D120475; Thu, 25 Feb 2021 11:18:21 -0500 (EST) In-Reply-To: (Leo Liu's message of "Thu, 25 Feb 2021 21:06:15 +0800") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:265629 Archived-At: > https://github.com/erlang/otp/blob/master/lib/tools/emacs/erldoc.el > suddenly has a compiler warning under emacs 27, which has no warnings > before. > > erldoc.el:535:1:Warning: the function =E2=80=98json-encode=E2=80=99 m= ight not be > defined at runtime. That's weird. I haven't downloaded the whole thing, but I tried to reproduce it by byte-compiling a file containing: (defun sm-foo-from-erldoc (json table output) (with-temp-buffer (if (not json) (pp table (current-buffer)) (eval-and-compile (require 'json)) (let ((json-encoding-pretty-print t)) (insert (json-encode table)))) (unless (file-directory-p (file-name-directory output)) (make-directory (file-name-directory output) t)) (write-region nil nil output nil nil nil 'ask))) and that doesn't give me any such warning, neither with Debian's 27.1 nor with `master`. Stefan