From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: defcustom standard value and byte-compilation Date: Tue, 10 Mar 2015 20:46:57 -0400 Message-ID: References: <87r3sxukh4.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426034842 27305 80.91.229.3 (11 Mar 2015 00:47:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Mar 2015 00:47:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 11 01:47:15 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 1YVUnq-000863-Rc for ged-emacs-devel@m.gmane.org; Wed, 11 Mar 2015 01:47:14 +0100 Original-Received: from localhost ([::1]:52084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVUnq-0004gC-8x for ged-emacs-devel@m.gmane.org; Tue, 10 Mar 2015 20:47:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54120) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVUne-0004g4-7m for emacs-devel@gnu.org; Tue, 10 Mar 2015 20:47:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVUna-000879-T1 for emacs-devel@gnu.org; Tue, 10 Mar 2015 20:47:02 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:13079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVUna-00086P-Ol for emacs-devel@gnu.org; Tue, 10 Mar 2015 20:46:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqcLAPOG1lQYjOjM/2dsb2JhbABbgwaDX4VTwGsCgQ5DAQEBAQEBfIQNAQQBfgsLDScSFBiIaQjOIyyPfxaEFAWfHYwaIoQKIoJzAQEB X-IPAS-Result: AqcLAPOG1lQYjOjM/2dsb2JhbABbgwaDX4VTwGsCgQ5DAQEBAQEBfIQNAQQBfgsLDScSFBiIaQjOIyyPfxaEFAWfHYwaIoQKIoJzAQEB X-IronPort-AV: E=Sophos;i="5.09,536,1418101200"; d="scan'208";a="113237227" Original-Received: from unknown (HELO pastel.home) ([24.140.232.204]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Mar 2015 20:46:58 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id AAB5810D7; Tue, 10 Mar 2015 20:46:57 -0400 (EDT) In-Reply-To: <87r3sxukh4.fsf@gnu.org> (Tassilo Horn's message of "Tue, 10 Mar 2015 13:04:39 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:183774 Archived-At: > I just found out that the form defining the standard value of a > defcustom is not subject to byte-compilation. IIRC this is not the case if you use lexical-binding. > The problem with that is that you can't use macros in there without > having to require the file providing the macro at load-time, too. Indeed, and the byte-compiler won't warn about unknown functions/vars and things like that. > I can use macros in functions and init-forms of defvars and defconsts > and they are all compiled away, so why shouldn't I allowed to do the > same for defcustoms? IIIRC there's a pending bug report about the new behavior in lexical-binding mode, because when you M-x customize-variable and ask to see the expression it shows you the byte-compiled gobbledygook instead of a readable expression. > Also, I don't find a note on that behavior in the docs. I don't think it was a conscious decision. Stefan