From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build: other output Date: Thu, 20 Jun 2019 14:55:38 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="88384"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Noam Postavsky , Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 20 21:54:48 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1he38x-000MsP-I3 for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2019 21:54:48 +0200 Original-Received: from localhost ([::1]:52602 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1he38w-00089k-AY for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2019 15:54:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51870) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1he2Dp-0000fD-8Y for emacs-devel@gnu.org; Thu, 20 Jun 2019 14:55:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1he2Dn-0006rc-Jt for emacs-devel@gnu.org; Thu, 20 Jun 2019 14:55:45 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15312) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1he2Dn-0006qg-Dv for emacs-devel@gnu.org; Thu, 20 Jun 2019 14:55:43 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 74BAF811BA; Thu, 20 Jun 2019 14:55:40 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2E9F780E09; Thu, 20 Jun 2019 14:55:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1561056939; bh=VxxJRxIAk08gm+aaqi1euUBB2EkaUyOFy5GjGQw2HYA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=TYHmqDSt9fxQ9PQg8ZZ274m/D4SdwIfybuzDs822l9x/l/6A4eEQlQZAGZsgeUzhv sWqcvTjYoqgI1IUsl9b+FQGJ9E5ln2qjvBFwyGu7RazEyTc0/xZbMgNwhb5Tkx7bAF gZxv2tdATOLTr88LzZpiP3elXebGoClhYdJB7+4alq+NpBwBIQSzLKQSBZGWY1hARv KuPUrXGhnsP3eV0RJ4GiltCnfJzXIHsIdTdVP9FXl8XbbyogegbVcRhglfPsKD0Xym W5mcJxK2pw9cQJi2uky6d5Yr7IH5tr2D2z5pFRV1eHiFRSJyICiUcFbS/5ocEKd907 y8I+1p22uLb3Q== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 14D3112051F; Thu, 20 Jun 2019 14:55:39 -0400 (EDT) In-Reply-To: (Lars Ingebrigtsen's message of "Thu, 20 Jun 2019 16:19:52 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237984 Archived-At: >>>> (put '* 'variable-documentation "Most recent value evaluated in IELM.") >>> Oh, nice. I'll put that in. >> In `master` you can even use `internal--define-uninitialized-variable`, >> which does all that `defvar` and `defconst` do except for setting the >> actual variable. And autoload.el won't recognize it as a definition. > > Hm... But is using `internal--define-uninitialized-variable' perhaps > more obscure than using (defvar sym) (put sym)? If that's something > that can be used "non-internally", perhaps it should have a different > name? It's a brand new function, introduced to fix several corner case problems in `defcustom`. Maybe it should be less "internal", indeed, but I don't know yet. FWIW, the differences with defvar+put that I can see are: 1- the docstring is purecopied if applicable (it's not applicable here). 2- the var is globally declared as dynamically-scoped (rather than only in the current file). 3- the variable is added to `load-history`. I'm not sure whether (2) and (3) are advantages or disadvantages in the present case. Stefan