GNU bug report logs - #58513
describe-function should say that defconst variables are constant

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Stefan Kangas <stefankangas@HIDDEN>; dated Fri, 14 Oct 2022 12:05:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 17 Oct 2022 05:41:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 17 01:41:17 2022
Received: from localhost ([127.0.0.1]:46900 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1okIsH-0003Wi-ED
	for submit <at> debbugs.gnu.org; Mon, 17 Oct 2022 01:41:17 -0400
Received: from mail-oi1-f178.google.com ([209.85.167.178]:45588)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1okIsF-0003WW-Ve
 for 58513 <at> debbugs.gnu.org; Mon, 17 Oct 2022 01:41:16 -0400
Received: by mail-oi1-f178.google.com with SMTP id o64so11010627oib.12
 for <58513 <at> debbugs.gnu.org>; Sun, 16 Oct 2022 22:41:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=hlrNlOBKkzEBjmPUeSsT7WhoNXoUlZu4ZhODGnTBVug=;
 b=QCePpFFbWY21Zx4XGnGJ4mCc9Wj+NNIA6pUBGHbKcGt0Pct4QecGRvZUm9j9csvh+e
 jv/785zd3oPamvCjXDbcWjd9DUlIcnRNlmiTxB9rg5U/HIabqAGz6g44gz5+kuD6PQLl
 UMPGpBO680yXFFlJdKu7h1fPdaf91fPyMYLSGKW1AED0aAJAxywOtYU6XfW9BuAMX32z
 B+5nM6F2lR64UfEvw7VP0SgluddYHfIdWYj3fiPxuc0cwczUb1Rmr8lw3/O9CacjiHEX
 5PEN/l2/Xycy5hgfpihJsabt/gbGkGG+Pjwu+BLEALwTqkg4caPFlTXwXo+e5b5NA9VM
 TOcQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=hlrNlOBKkzEBjmPUeSsT7WhoNXoUlZu4ZhODGnTBVug=;
 b=dEZYo/i26M/Adkmy5NQtjSzpeOyIqVWG+0KhM1v/Bec5k67igj3hx73LFyr7NbAh6Y
 QsycF9svhCnHHv7uDWSSQDDVUsdebqfjKut3M6vAUhpbocYOzq3kZQ2P25aft9yMa/LJ
 QdbBFsJtBKT3Q89kBjgTBJyzHAQ06SeBMkpgpTtR06PZN8X4YJcSATScFlUWq+gNGRMR
 Sm/QIM6C9GIC4lee2Hm5WDaImkZauH9Cnj4RqQWB6NnkjMqAGm8uDjQPZZ4aV7sx8+0z
 co6SsMgoIrOaHptpF7gbFRqVP/0PEjB78QHFnghRQtrcLUT+5DhyAnKWNQZUFL03GJwF
 np1w==
X-Gm-Message-State: ACrzQf24P1bilFDolYrG/IXZPY346LXqUOnYqVdRoxytXerY/c9OHg1n
 qYd42Ys2IvfZ9vv7+QVRAH8s1/ImWs3xMmVUZMo=
X-Google-Smtp-Source: AMsMyM6F2xWnE9T3Erp2H4dZ4or+5E9wf+LtU6Rcbf0irETDlMZhpvqF3yfHFXqk4y/SgsNh6qvOISeakatchqY9bi4=
X-Received: by 2002:a05:6808:1186:b0:353:b77a:a481 with SMTP id
 j6-20020a056808118600b00353b77aa481mr12523008oil.199.1665985270370; Sun, 16
 Oct 2022 22:41:10 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 17 Oct 2022 05:41:09 +0000
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <E1okAc1-0002zQ-D6@HIDDEN>
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
 <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
 <87edva8seu.fsf@HIDDEN> <jwvo7uepmag.fsf-monnier+emacs@HIDDEN>
 <87sfjq7a91.fsf@HIDDEN> <jwv4jw6fjr5.fsf-monnier+emacs@HIDDEN>
 <875ygl5roe.fsf@HIDDEN> <E1okAc1-0002zQ-D6@HIDDEN>
X-Hashcash: 1:20:221017:monnier@HIDDEN::wnXHaFTqHLaKVnW5:7Vxd
MIME-Version: 1.0
Date: Mon, 17 Oct 2022 05:41:09 +0000
Message-ID: <CADwFkmm90EzB9J1-Zb_4fpwYUe3CuahwE=h+QZya0d8tMpfavg@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
To: rms@HIDDEN, Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58513
Cc: psainty@HIDDEN, monnier@HIDDEN, 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Richard Stallman <rms@HIDDEN> writes:

> defconst has had a subtle meaning: "It is ok to expect, in certain
> limited ways, that the value will not be altered."  Nothing more.

To my mind, the meaning is not subtle.  On the contrary, it is both
clear and well-documented.

The manual (info "(elisp) Defining Variables") explains:

    [defconst] defines SYMBOL as a value and initializes it.  It informs
    a person reading your code that SYMBOL has a standard global value,
    established here, that should not be changed by the user or by other
    programs.

From where I'm standing, this means that there is no practical
difference between a defconst and a defvar that Lisp code can rely on.

So, to give a somewhat contrived example, you can still break any
mathematical calculation in Emacs with:

    (setq float-pi 9)

The only way to not have your code break in the face of that is to
copy-paste the literal 3.141592... everywhere.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 16 Oct 2022 21:11:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 16 17:11:12 2022
Received: from localhost ([127.0.0.1]:46380 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1okAud-0006d5-KO
	for submit <at> debbugs.gnu.org; Sun, 16 Oct 2022 17:11:12 -0400
Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:36212)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1okAuY-0006cu-FA
 for 58513 <at> debbugs.gnu.org; Sun, 16 Oct 2022 17:11:09 -0400
Received: from pps.filterd (m0246630.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29GL7LLt013589;
 Sun, 16 Oct 2022 21:11:05 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2022-7-12;
 bh=GWY+juSgo/SPk4jI3lt5PflU6p7Gm2HeenvxzLLDaW4=;
 b=a5MDa464V5RQqe0b8/7iU4RPsdC46rcV8kGy5YpDTzOqG5uLqw5pjDoV3tkIPlCAwU1V
 nPvyAkggHtq6N+3dSMDZ9yLzIAWd8DLkFEYmQcwwnB7rvxMbWoylPc2WnbaTfxf07kHF
 EUn1Ka3HsjS8B7OyLYp0e1K5jaDDtr3mkdqhTvVqXrtDLZgmeY4bsAKJLMHQRvs724yX
 QsP6kcKg3EzXGl4q5UWl/dO8IUH/DCdPNTBfnHsHJKx0H5L9NwMp8f9DKItE7dKWBW0U
 ayiwnkpHUw6s3yKbYyhfiM3JPX7bj/MlUagdtFLvp3J/Uipy22qHhrR3XZMi4Ctb4uAX 4g== 
Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com
 (iadpaimrmta03.appoci.oracle.com [130.35.103.27])
 by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3k8jt2g8gh-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 16 Oct 2022 21:11:05 +0000
Received: from pps.filterd
 (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
 by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5)
 with ESMTP id 29GCBDgZ028438; Sun, 16 Oct 2022 21:11:05 GMT
Received: from nam12-dm6-obe.outbound.protection.outlook.com
 (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170])
 by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id
 3k8hr86hwj-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 16 Oct 2022 21:11:04 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=kr3ZHDeKUyaQhdHJv7hA8vtYXjwb9ArmMT9psw8Y3Pa82CUirS5ihn1fTkuLVSvI/8sCKYXw+DyeBXT1sjl0/3pZMCdmPICSB3E7NF4PRd40zJ6YazjA9sv5+7yOn9wJ67XEcWK29SSUNyUOS1yjY5d2GyVrVhhWfUC1ctHP5pPcC8uKgiD64AK48HBeWyM+Yxil0r3az/xbh1jQUHMqJ1oOBj4x4L0ccQhxC9dI7STYLSojfIA00f7buQqPWuhVt8hHVEiaNxHiUN+0H6Fihl4pdjR1lfojJBBF3eLYU0ulDVXHNkdXCuFVz5T3kqVniSDwRnjzhg+uUIXkDIxVXA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=GWY+juSgo/SPk4jI3lt5PflU6p7Gm2HeenvxzLLDaW4=;
 b=NL1SwvK9OYhTpRFKiBtzb1n3Ea1lFWfaO4J+0ZkjQyyXwBgjMiltadYlGDT1ZLojNgOAu0plp7ClHpNt8s8Me3QIdC2E/arCCvPqJT5JqPT6GDuBvzFxulaRKLTMgDeFPY3xmPQgqqU6eL8kveqdX2ShzEID3rYHLXz7bYGoixToZF7nV/GQznWFntV8vNnGoZ8IZ3kT7x2UuBj5tJhnBDN6+a+hJUjWczQzAEfJHYJuzMn7yMCC/3f+iGYbGok/X3lnxQfD6xuYVtnSDWKr88vBuuyHVkSu3j8lVT9n6vLr4hEKra1MNp8GeNdCO8PhHudfQ7opBvTLfZqSY8SCDQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=GWY+juSgo/SPk4jI3lt5PflU6p7Gm2HeenvxzLLDaW4=;
 b=ANtqU8duqji48VZZHh47ILQKAPU0RlwL4PdLH0hf/Ho5NdXD6CLcpYxReEtikNkZWWGvCH4qLwij5pz3c76zcg3xgibR/oJ0dO1fa+rbwp2Pt1FhA36UPXESNdkx0ltjiC+72GeCb3PtqKb9iQqLkVPKQ8NtqpSf3Vrd+L6toL8=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by DS0PR10MB6845.namprd10.prod.outlook.com (2603:10b6:8:13e::16) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Sun, 16 Oct
 2022 21:11:02 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::2e97:93c5:7222:5b31]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::2e97:93c5:7222:5b31%5]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022
 21:11:01 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: "rms@HIDDEN" <rms@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>
Subject: RE: [External] : bug#58513: describe-function should say that
 defconst variables are constant
Thread-Topic: [External] : bug#58513: describe-function should say that
 defconst variables are constant
Thread-Index: AQHY4aFMu5Bld2Iw6keyuuFV96ugP64RgbcQ
Date: Sun, 16 Oct 2022 21:11:01 +0000
Message-ID: <SJ0PR10MB5488558A398AA44F301DB708F3269@HIDDEN>
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
 <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
 <87edva8seu.fsf@HIDDEN> <jwvo7uepmag.fsf-monnier+emacs@HIDDEN>
 <87sfjq7a91.fsf@HIDDEN> <jwv4jw6fjr5.fsf-monnier+emacs@HIDDEN>
 <875ygl5roe.fsf@HIDDEN> <E1okAc1-0002zQ-D6@HIDDEN>
In-Reply-To: <E1okAc1-0002zQ-D6@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|DS0PR10MB6845:EE_
x-ms-office365-filtering-correlation-id: 3369bf8b-fae9-4d60-5b3e-08daafbaeddc
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: IdFmmHmGZ2JfEk8TQvKfq1albfedrmI6r/TOoYDw7h5DjV2jL1A8MbO+xGhRAx+rH8exvbQqhXXqcTMP4JeFZ5rCv60VcPxvHEEt7p6tY7TccFqdRLIcEyGCxhjXHYZFW6CqySwMVfpa3Fo1XmTLGyGCQvtDjzWCGFTlgorPZWTDPyvfEt9hodI371TuK4SXLrLVjSbIabRIEIjzCQ+luWyXts/UwnaKgF/tye7S5FHrTfMNJVIj4iKwBDauIeeggm84sJ28yfQ65CuoeuTb2zk26sYVPnAJjsr+sYdKmuB5APZbdi7Wq1eidgJci2jSeQMscMqhw4eIbSfHa1S6pVO1ZLKiIETo6e1gVhGdBl4+oTZ3K5fP1Gvw7aChoFYj5Qvj4q0gtdE/+PjQgdivjU4fYsfAqDWs6FQVrw55D/ASjrz7wxi8WfCrCBG8eOKZ8Bca+dvsP4YrDLp9p+WnRT2e1gRO4tgBWFLNQcuQIzWa9aFgQbmRbzwud0hh9tM/d600+6iBZteCGOMiHew53ZKaN2maz9mrhm3shoSgS/v7NQ9Ufyfb7YV/NxvI9kkDQliRB1J8ckzEb6E5SxJPVhgsrMuWBm8+L8kctKxdxadiAaXvCRyBRTeeHow3sTWa2h6ofyOQ9Mh1qKTmKyIYm3pWQeewDKe/2ZlpHrLiuUdjJH7BqSO9U61UUXr0zqPCml3FB+TpnGG5eoAdHClRVejkWfrxK/vr4XhxXD4WNDK0hQr+WsJ9SnWFqchptagpgAcLiqaOhe6IGaPcUExVkQpLfNByCYblijOCxCvGDfM=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(13230022)(366004)(346002)(136003)(39860400002)(396003)(376002)(451199015)(83380400001)(38070700005)(55016003)(33656002)(86362001)(38100700002)(122000001)(76116006)(66476007)(66556008)(66946007)(66899015)(316002)(110136005)(54906003)(66446008)(5660300002)(44832011)(8936002)(64756008)(966005)(186003)(71200400001)(2906002)(6506007)(4326008)(7696005)(9686003)(52536014)(478600001)(8676002)(26005)(41300700001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?utf-8?B?YnFCZTdiL055SjIrUk5EL1E0dWxUUjRtMll4MHR1cUhXVUp3VjltWDBvcDV3?=
 =?utf-8?B?WjhITTZRQXhuQ0xWR1FWM2JzV3FOZlVKa1lGdUZ6VDZlZlF3RTRQWjM1NWgz?=
 =?utf-8?B?K0FmWEdYNllrYmVtOXZjVUtTdGtoa1dVdHpwUCtiaXJvcUNSQ2xFMnBHZjEv?=
 =?utf-8?B?WWlQVllQMHlKQS9EOUx0SDBaald0dzVIMHhYaHhtcGtPWWlnVWU5QTZZeFNj?=
 =?utf-8?B?SW8yM2hzWUlJVEZwUz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 =?utf-8?B?TXhIMG9BR1NyRGtIYmJQaW9zTWZJTFNINzU3U0ZHd3d6QWlkRXROTzFzK254?=
 =?utf-8?B?VWI1Nm1qSVZBRnNGM2JkaWdXTDAvNGkrWFJlQ3pwdDlpQWJRckdZUVd2KzFB?=
 =?utf-8?Q?FMcYHoC4hmsMrmYRlereM/l56?=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 3369bf8b-fae9-4d60-5b3e-08daafbaeddc
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2022 21:11:01.5453 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: n34mYRCRZG9kk0pzFCc/EO4uWEM8vLkQIacqzBQxS9poAdMriv2jyzk9Rr4p7udPWmZmRmc4bixRGICrdPbuNg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6845
X-Proofpoint-Virus-Version: vendor=baseguard
 engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1
 definitions=2022-10-16_15,2022-10-14_01,2022-06-22_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0
 spamscore=0 bulkscore=0
 mlxscore=0 phishscore=0 suspectscore=0 adultscore=0 mlxlogscore=999
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000
 definitions=main-2210160131
X-Proofpoint-ORIG-GUID: Pa1DGFQWwVKIiqObI5Gs0-NQeT4CCWea
X-Proofpoint-GUID: Pa1DGFQWwVKIiqObI5Gs0-NQeT4CCWea
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > > And then, in a later Emacs version,
 we could start enforcing
 the > > constness in running code. > > defconst has had a subtle meaning:
 "It is ok to expect, in certain > limited ways, that the valu [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [205.220.177.32 listed in wl.mailspike.net]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [205.220.177.32 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 2.0 URI_DOTEDU             Has .edu URI
X-Debbugs-Envelope-To: 58513
Cc: "psainty@HIDDEN" <psainty@HIDDEN>,
 "stefan@HIDDEN" <stefan@HIDDEN>,
 "monnier@HIDDEN" <monnier@HIDDEN>,
 "58513 <at> debbugs.gnu.org" <58513 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender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SU9OMDA5MzIwMDAwMDAwMDAwMDAwMDANCg0K




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 16 Oct 2022 20:52:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 16 16:52:06 2022
Received: from localhost ([127.0.0.1]:46369 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1okAcA-00068M-9V
	for submit <at> debbugs.gnu.org; Sun, 16 Oct 2022 16:52:06 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41586)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1okAc8-00067h-9i
 for 58513 <at> debbugs.gnu.org; Sun, 16 Oct 2022 16:52:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55492)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rms@HIDDEN>)
 id 1okAc1-0005Bu-L0; Sun, 16 Oct 2022 16:51:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From:
 mime-version; bh=cDqKvzq1jjyuhstA/NEX0lc3mtX9tHOGeJkoJSqHu0A=; b=eRhwYSB6j4cq
 jAMM214VTV+nDWWbqVsIHNDLjzmUA6EKXOQ2FNpVVPtpqxhrsSCbRoiqrzCjhlwkoT+OzG/nTbdhY
 znklhA8zKRChVSatt4vtcJpql+n53/5TlxvzIWIK4UIdWEeGJVAahCG2eCdk9UizhSVNIetUQHdLp
 +CHauy8NqCJ0Pr12YlnVYakUFv2N7TzsU5rppUAkCJURqFDsR7YGb46USYkaOO18Fwi/TFvBuHXJ2
 diBfN6523ozO2big/ilNYhJtVEZjywLz483UAqmD6rONirzAL7xDRfNN/NwW/f1TR0ShGx77tMW+u
 bBQSM87DFgFsmx7HjyMNTg==;
Received: from rms by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1okAc1-0002zQ-D6; Sun, 16 Oct 2022 16:51:57 -0400
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <875ygl5roe.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sat, 
 15 Oct 2022 12:04:17 +0200)
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
 <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
 <87edva8seu.fsf@HIDDEN> <jwvo7uepmag.fsf-monnier+emacs@HIDDEN>
 <87sfjq7a91.fsf@HIDDEN> <jwv4jw6fjr5.fsf-monnier+emacs@HIDDEN>
 <875ygl5roe.fsf@HIDDEN>
Message-Id: <E1okAc1-0002zQ-D6@HIDDEN>
Date: Sun, 16 Oct 2022 16:51:57 -0400
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58513
Cc: psainty@HIDDEN, stefan@HIDDEN, monnier@HIDDEN,
 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > And then, in a later Emacs version, we could start enforcing the
  > constness in running code.

defconst has had a subtle meaning: "It is ok to expect, in certain
limited ways, that the value will not be altered."  Nothing more.

This change may seem to be fixing a bug, but some old programs used to
take advantage of the actual old meaning.  This change might break
them.

I think that would be asking for trouble, and we have better things to
do than deal with that trouble.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 15 Oct 2022 14:11:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 15 10:11:47 2022
Received: from localhost ([127.0.0.1]:42311 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojhtC-0008Tt-UJ
	for submit <at> debbugs.gnu.org; Sat, 15 Oct 2022 10:11:47 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60028)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1ojhtA-0008Tf-Tc
 for 58513 <at> debbugs.gnu.org; Sat, 15 Oct 2022 10:11:45 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 25481100130;
 Sat, 15 Oct 2022 10:11:39 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B9477100084;
 Sat, 15 Oct 2022 10:11:37 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1665843097;
 bh=EYk8re3KK43526q+qTG5bloIGGmogtcAZ4fmS6AOX1I=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=CJVo8V0sjrDG6lQOcyBWKGBVSOYzGMqfvQg4ydGtn/Z4O/uHTZHMHcZRsdIkSM1fa
 PLQuBB4FVwILwh/W+6o9mrwicMRHV0qRgAuIxWJHTS3Fpv5aA6onoCgIM7nXeIDEja
 Z/g4EJRQihPFy8bS9fAw2+/1gaI7wDbQKm9gM8oAPd/+P7+bDUicdDTY6A/GR/E7iT
 yM4SoIBu5l4D4IYH+JMPpQ/O3gl4GIdwC5FAwdkbV7GkfK+NDmUsNzjsKlgAIKHlIr
 ehiuekzyP/nkvsuGbZUequ66wNGXRBSfVPB/wgiOaUz/NKKKD08Y5ypiIGq66aU3Q+
 6WkAZR5nXDrug==
Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4AA3B1205E5;
 Sat, 15 Oct 2022 10:11:37 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
In-Reply-To: <CADwFkmnfLuEYVvwpVuWXAEiMpWknqxOz2suqcynW42wQzTULWA@HIDDEN>
 (Stefan Kangas's message of "Sat, 15 Oct 2022 12:33:29 +0000")
Message-ID: <jwvsfjpkwsh.fsf-monnier+emacs@HIDDEN>
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
 <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
 <87edva8seu.fsf@HIDDEN> <jwvo7uepmag.fsf-monnier+emacs@HIDDEN>
 <CADwFkmnfLuEYVvwpVuWXAEiMpWknqxOz2suqcynW42wQzTULWA@HIDDEN>
Date: Sat, 15 Oct 2022 10:11:35 -0400
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.071 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58513
Cc: Phil Sainty <psainty@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>,
 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Kangas [2022-10-15 12:33:29] wrote:
> Stefan Monnier <monnier@HIDDEN> writes:
>> The byte-compiler already does warn about it, but only if the assignment
>> is in the same file as the `defconst`.
> I don't get any warnings with this recipe:
>
>     echo "(defconst foo-bar t) (setq foo-bar nil)" > /tmp/foo.el
>     emacs -Q -batch -eval '(byte-compile-file "/tmp/foo.el")'
>
> Am I missing something?

Hmm... I don't get a warning either.  And looking at `bytecomp.el` I see
that we push stuff to `byte-compile-const-variables` but we never look
stuff up in it :-(

I'm pretty sure I wrote some code to use that variable (apparently
around 2003), but apparently it got lost in subsequent changes, probably
when we introduced lexical-binding.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 15 Oct 2022 12:33:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 15 08:33:38 2022
Received: from localhost ([127.0.0.1]:39751 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojgME-0005E5-5K
	for submit <at> debbugs.gnu.org; Sat, 15 Oct 2022 08:33:38 -0400
Received: from mail-oa1-f53.google.com ([209.85.160.53]:38480)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1ojgMB-0005Do-AW
 for 58513 <at> debbugs.gnu.org; Sat, 15 Oct 2022 08:33:36 -0400
Received: by mail-oa1-f53.google.com with SMTP id
 586e51a60fabf-1322d768ba7so8805245fac.5
 for <58513 <at> debbugs.gnu.org>; Sat, 15 Oct 2022 05:33:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=04ZJcUvBTHgShaPoDVFpghPVcuLrMeG5nv7zdNUVE3s=;
 b=gdmEmbqYAa1giEgbYpGQIfNyL3CvFabMzW9BSE3pIc9vWZ/sUZc2tPLvLeKNF14i22
 dDpgi2jnrZ0uai0lIH2gYQAHRlpNtanFq18M5LE3ofc+8emFUAsaBqhubD2kVIQIwQOW
 PtQJE+kkJSjahEsjRpzXerr42YaGBohqc9hjbR/WOLqSMbMWgeetsuSMBOG84W8dNU9K
 /oVK1b7UddcCh29wrfpb2l1gCy00NHIKFhop1uhdOB4DTOJzC9bkVsAXMvTd4SiAkkDR
 3B5CDd/TH7jSDEDCyRstUEqAFkrRTyBxe4rpSRjfM9nao/trja9E5Vwl/65Q1UD6p+oa
 ugCQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=04ZJcUvBTHgShaPoDVFpghPVcuLrMeG5nv7zdNUVE3s=;
 b=bCLXbSkzIjVSWpvq6YNRWHJI4llj3K5awHhEeO7WF5GSmaVMbJUczO86ha43/mNy2g
 /HmBecQN13cnYa90x8oerIGJX2L5wpPIXN7hU4kwKGfNHCQ+xOVCq8U++W1onGWhDIi9
 UlAZ2BVaq8LkD0Xy8Po9peXJjrtUcW84V/FO2wWd/EjzNZ1KACGpfTHqaxmdzc4+yAO3
 OaG0xxvX0IUKB/BHW8XAQSvOYUug05tWjwnu0zh8LLVIDDcV/+SiTDp6IQa3A7PL9nt4
 II4F2CMtg5NGTfIBCwfnWO6fw6lRiXmxfyZ1fBJKKYU/Uxz7jHxQ+TiLD9jyt4bUEtpS
 zRTg==
X-Gm-Message-State: ACrzQf3WqGgHTW8kc1Q6y/1oSAdOPFywxeCJbNbqwBPAX9SQz9sDS/Gd
 HOaIf/seinVRMrzzk7jBbpIR3VBDvp6yrJxVWDM=
X-Google-Smtp-Source: AMsMyM7oNRde61q0p7R9UYgDQoN6GtA84p+gy81H9hkyC5H+BzucZbgQHGkOLzozNFTwN96rD2u5LPYqqTIBgr0OE/w=
X-Received: by 2002:a05:6870:9126:b0:132:b724:e96c with SMTP id
 o38-20020a056870912600b00132b724e96cmr11054490oae.199.1665837209791; Sat, 15
 Oct 2022 05:33:29 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 15 Oct 2022 12:33:29 +0000
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <jwvo7uepmag.fsf-monnier+emacs@HIDDEN>
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
 <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
 <87edva8seu.fsf@HIDDEN> <jwvo7uepmag.fsf-monnier+emacs@HIDDEN>
X-Hashcash: 1:20:221015:monnier@HIDDEN::C6qA4WkykQ3uf6KY:3SdG
MIME-Version: 1.0
Date: Sat, 15 Oct 2022 12:33:29 +0000
Message-ID: <CADwFkmnfLuEYVvwpVuWXAEiMpWknqxOz2suqcynW42wQzTULWA@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
To: Stefan Monnier <monnier@HIDDEN>,
 Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58513
Cc: Phil Sainty <psainty@HIDDEN>, 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> The byte-compiler already does warn about it, but only if the assignment
> is in the same file as the `defconst`.

I don't get any warnings with this recipe:

    echo "(defconst foo-bar t) (setq foo-bar nil)" > /tmp/foo.el
    emacs -Q -batch -eval '(byte-compile-file "/tmp/foo.el")'

Am I missing something?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 15 Oct 2022 10:04:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 15 06:04:30 2022
Received: from localhost ([127.0.0.1]:39518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oje1u-0002PG-Ds
	for submit <at> debbugs.gnu.org; Sat, 15 Oct 2022 06:04:30 -0400
Received: from quimby.gnus.org ([95.216.78.240]:56036)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oje1s-0002Oy-Mv
 for 58513 <at> debbugs.gnu.org; Sat, 15 Oct 2022 06:04:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=06b24jpI8QvCErf245/jVifvHeDFOR0nXg2yXOS8L5g=; b=K83mN40qZPNnbyKMyAA9xBhm+f
 m8R6+M9/NJlp4+JXeKP0HA9h6bXb+WI86cAF3bdwbwtlTCfi1Em7Tny4LeAyt83wHa9NdDiPlRtku
 mDGXV6fH0/p8iHCQfPFe9ptCZTAlH5EQfGTEJCXYKrqFzWWgNsd1lQbWlCDgwynV/hHk=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oje1j-0006ue-4o; Sat, 15 Oct 2022 12:04:21 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
In-Reply-To: <jwv4jw6fjr5.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Fri, 14 Oct 2022 12:44:01 -0400")
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
 <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yV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Callahan & Bonnie Prince Billy's _Blind Date Party (2)_:
 "Miracles"
Date: Sat, 15 Oct 2022 12:04:17 +0200
Message-ID: <875ygl5roe.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Stefan Monnier <monnier@HIDDEN> writes: > - since
 that new branch always signals an error (well, in my own code, > that is:
 I don't know what that branch would end up doing on `master` > where we'd
 want to be more careful about backward com [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58513
Cc: Phil Sainty <psainty@HIDDEN>, Stefan Kangas <stefan@HIDDEN>,
 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Monnier <monnier@HIDDEN> writes:

> - since that new branch always signals an error (well, in my own code,
>   that is: I don't know what that branch would end up doing on `master`
>   where we'd want to be more careful about backward compatibility), it's
>   expected to be more-or-less never taken and even the most naive branch
>   predictors should handle it "perfectly".

I see; that sounds good.

So perhaps we should be moving in this direction, then.

That is, start by making defconst mark the variables (perhaps in the way
you've already implemented?), and then make byte-compilation warn about
assigning to defconsts (and make describe-function expose the
information, as requested).

And then, in a later Emacs version, we could start enforcing the
constness in running code.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 14 Oct 2022 16:44:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 12:44:12 2022
Received: from localhost ([127.0.0.1]:38470 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojNnA-0000iQ-KT
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 12:44:12 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16154)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1ojNn8-0000i6-0i
 for 58513 <at> debbugs.gnu.org; Fri, 14 Oct 2022 12:44:10 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2DE29440F7D;
 Fri, 14 Oct 2022 12:44:04 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6C05D4411C8;
 Fri, 14 Oct 2022 12:44:02 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1665765842;
 bh=saDz1ipLnSBgbmiLVG8mf0oWRJGqYwQJEVQwmiHLxdo=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=Uy3AHVhzi4ZF/+qvRV2KGpUWTilZRwpO7afR9U4Vtl+GB9N5jJ4EU3GMNiWSKgbzi
 sKby+UFiHmsKWW61lun/NKi6uZwOTki/Q1h8UHca/ak66Qtqc0DghC0I8TLGGe5uMy
 uKkRLxq4SmlaDNZWnImUkPZVmYxjkCJLY/RxWxtJB4AORBb1+XZcHM3VXjhT7sP8cg
 BMRceX3A0WR+WPcCrd3iV0q+rgqBkic2VqIkpovHcUgyrxJFO2TNYzqAnzXvDvXM+d
 e/X+P4VPxjh/ROgXCIFvbpcBuDHsQ7T9+2I41nfKVY+de9/+CxQ+zuNtWPO85VuWzW
 Rq+LcFVRuEkmA==
Received: from alfajor (unknown [45.44.229.252])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 43556120F05;
 Fri, 14 Oct 2022 12:44:02 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
In-Reply-To: <87sfjq7a91.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 14 Oct 2022 16:25:30 +0200")
Message-ID: <jwv4jw6fjr5.fsf-monnier+emacs@HIDDEN>
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
 <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
 <87edva8seu.fsf@HIDDEN> <jwvo7uepmag.fsf-monnier+emacs@HIDDEN>
 <87sfjq7a91.fsf@HIDDEN>
Date: Fri, 14 Oct 2022 12:44:01 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.745 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 KAM_STOCKGEN              1.5 Email Contains Generic Pump & Dump Stock Tip
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58513
Cc: Phil Sainty <psainty@HIDDEN>, Stefan Kangas <stefan@HIDDEN>,
 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Lars Ingebrigtsen [2022-10-14 16:25:30] wrote:
> Stefan Monnier <monnier@HIDDEN> writes:
>> FWIW, my own local Emacs has `defconst` create actually
>> constant variables by adding a `SYMBOL_DEFCONST` to `enum
>> symbol_trapped_write`.  Admittedly I didn't make them really constant:
>> I allow a subsequent `defconst` to change the value set by a previous
>> `defconst`, but `setq` signals an error just like it does if you try to
>> `setq` on `enable-multibyte-characters` or on `nil`.
>
> Hm...  do you know if there's a performance impact from doing this?

In terms of memory use, we already use 2 bits for that `enum
symbol_trapped_write`, so adding a new value doesn't cost anything
at all.

In terms of run-time, it adds a 4th branch to a few 3-branch `switch`
statements, so it can have a performance impact, most importantly in
`set_internal`, I guess, but I'd be very surprised if it's ever not lost
in the noise:

- it only affects `setq` on global/dynamic vars which should be a small
  fraction of the overall `setq` we perform nowadays.
- since that new branch always signals an error (well, in my own code,
  that is: I don't know what that branch would end up doing on `master`
  where we'd want to be more careful about backward compatibility), it's
  expected to be more-or-less never taken and even the most naive branch
  predictors should handle it "perfectly".


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 14 Oct 2022 14:25:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 10:25:44 2022
Received: from localhost ([127.0.0.1]:38270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojLdA-0005ED-06
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 10:25:44 -0400
Received: from quimby.gnus.org ([95.216.78.240]:47198)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1ojLd7-0005Dw-JK
 for 58513 <at> debbugs.gnu.org; Fri, 14 Oct 2022 10:25:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=RMtDAYWhqdWcA3tcy1nBI7qyQAiEdahslO8iEwJT2kI=; b=uJp4Yp50TNv1SCPoHXx9TnozOH
 SJ+ZroYXpgVW9h3G7+LG1nQzJU+HuZ9PpQNf4O/i+YFa/4yfVGjQqAk7B1MaUlLs2Vqg/5TGnSEm3
 UDk/PvlNyFP7XpuKK9XrhY6XojO8c+9SU3m+rg/K7w6vIMIdiXFe1HoPCmvTguCatwL0=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1ojLcw-0006ic-Sy; Fri, 14 Oct 2022 16:25:33 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
In-Reply-To: <jwvo7uepmag.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Fri, 14 Oct 2022 09:34:00 -0400")
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
 <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
 <87edva8seu.fsf@HIDDEN> <jwvo7uepmag.fsf-monnier+emacs@HIDDEN>
X-Now-Playing: Slammy Karugu's _L'Esprit de Nyege 2020_: "Incest and Meth"
Date: Fri, 14 Oct 2022 16:25:30 +0200
Message-ID: <87sfjq7a91.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Stefan Monnier <monnier@HIDDEN> writes: > FWIW,
 my own local Emacs has `defconst` create actually > constant variables by
 adding a `SYMBOL_DEFCONST` to `enum > symbol_trapped_write`. Admittedly I
 didn't make them really constant: > I allow [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58513
Cc: Phil Sainty <psainty@HIDDEN>, Stefan Kangas <stefan@HIDDEN>,
 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Monnier <monnier@HIDDEN> writes:

> FWIW, my own local Emacs has `defconst` create actually
> constant variables by adding a `SYMBOL_DEFCONST` to `enum
> symbol_trapped_write`.  Admittedly I didn't make them really constant:
> I allow a subsequent `defconst` to change the value set by a previous
> `defconst`, but `setq` signals an error just like it does if you try to
> `setq` on `enable-multibyte-characters` or on `nil`.

Hm...  do you know if there's a performance impact from doing this?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 14 Oct 2022 13:34:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 09:34:18 2022
Received: from localhost ([127.0.0.1]:36251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojKpN-0003L3-NR
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 09:34:17 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:65094)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1ojKpL-0003Kc-7k
 for 58513 <at> debbugs.gnu.org; Fri, 14 Oct 2022 09:34:16 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3D045807E8;
 Fri, 14 Oct 2022 09:34:09 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D0D3A80014;
 Fri, 14 Oct 2022 09:34:07 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1665754447;
 bh=XGLmEWYrZAa1zKJHrRQXhdBWh4q8qJvx1LvifuiHjOk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=h0fE/sp5KUf+wLdnmJ0Hb6kSlPpaQ4hsTejlThbXQZULIERw3NnozX8CEzcPVY0V3
 1XwMBc5+qN7KTRgkPW23MNFxecxnitU5CWuPlbJLW8KGo+NSZgkvpw8GBg1qyrGZg4
 CatPqJlQE/oyFXtdIy7u8xjEKZiUGupWePCq6ek14lGFtnyctdpt2dvs/hRL57Vw0E
 wHS+pnZyyuk/ne1UtSDCeOCjJLpAZPIoVMG3iUplVTtplY43k9tmBN8Ok7W58i6Rva
 ZroqFy8MxXJud5nvm+yTX6osbp7W/k4HrvVHTkXt9thMrJcPYSVrjeiPduknMYuqw+
 1r/Cw9KOmoRMA==
Received: from alfajor (65-110-220-202.cpe.pppoe.ca [65.110.220.202])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 98D2912090D;
 Fri, 14 Oct 2022 09:34:07 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
In-Reply-To: <87edva8seu.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Fri,
 14 Oct 2022 15:07:53 +0200")
Message-ID: <jwvo7uepmag.fsf-monnier+emacs@HIDDEN>
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
 <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
 <87edva8seu.fsf@HIDDEN>
Date: Fri, 14 Oct 2022 09:34:00 -0400
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.895 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 KAM_STOCKGEN              1.5 Email Contains Generic Pump & Dump Stock Tip
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58513
Cc: Phil Sainty <psainty@HIDDEN>, Stefan Kangas <stefan@HIDDEN>,
 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Yes, incurring a run-time cost doesn't sound worth it, but we could
>> perhaps make the byte-compiler warn about it.

The byte-compiler already does warn about it, but only if the assignment
is in the same file as the `defconst`.

FWIW, my own local Emacs has `defconst` create actually
constant variables by adding a `SYMBOL_DEFCONST` to `enum
symbol_trapped_write`.  Admittedly I didn't make them really constant:
I allow a subsequent `defconst` to change the value set by a previous
`defconst`, but `setq` signals an error just like it does if you try to
`setq` on `enable-multibyte-characters` or on `nil`.

I didn't bother exporting this info to `describe-variable` (and the
byte-compiler) but it would be easy to do.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 14 Oct 2022 13:08:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 09:08:08 2022
Received: from localhost ([127.0.0.1]:36211 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojKQ4-0002dL-ID
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 09:08:08 -0400
Received: from quimby.gnus.org ([95.216.78.240]:46530)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1ojKQ2-0002co-6u
 for 58513 <at> debbugs.gnu.org; Fri, 14 Oct 2022 09:08:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=nP963nm8fwdLet12Rq1Ph+iHe8gJB+cL+kLTl+zNGI8=; b=d3OW/nBDcc5fqhucDHt6JMaGoC
 PQMlDw/sVdxJEFgpXfU7TMrnwGKxLKo4sLh/lhY0T76aUkKorevigq+vxgVHu5lhm/HsW+4IkUREj
 krGBicCy9iWu4j2dC1TtVSKWNJiEETwqtVAW5wojZ1Xi4psgK8VGCnrks4iPzn0tTgXQ=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1ojKPs-00069w-FR; Fri, 14 Oct 2022 15:07:58 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
In-Reply-To: <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
 (Stefan Kangas's message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0ZGF0
 ZTpjcmVhdGUAMjAyMi0xMC0xNFQxMToxODo0MSswMDowMKTBsXkAAAAldEVYdGRhdGU6bW9kaWZ5
 ADIwMjItMTAtMTRUMTE6MTg6NDErMDA6MDDVnAnFAAAAAElFTkSuQmCC
X-Now-Playing: Catudiosis's _L'Esprit de Nyege 2020_: "Kakoze"
Date: Fri, 14 Oct 2022 15:07:53 +0200
Message-ID: <87edva8seu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Stefan Kangas <stefankangas@HIDDEN> writes: > Yes,
 incurring a run-time cost doesn't sound worth it,
 but we could > perhaps make the byte-compiler
 warn about it. Yes, that's true... 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58513
Cc: Phil Sainty <psainty@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Kangas <stefankangas@HIDDEN> writes:

> Yes, incurring a run-time cost doesn't sound worth it, but we could
> perhaps make the byte-compiler warn about it.

Yes, that's true...

I'm bringing Stefan M into this thread; perhaps he has some opinions.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 14 Oct 2022 13:03:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 09:03:18 2022
Received: from localhost ([127.0.0.1]:36194 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojKLN-0002Um-Nd
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 09:03:17 -0400
Received: from mail-oa1-f42.google.com ([209.85.160.42]:42597)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1ojKLM-0002UW-FR
 for 58513 <at> debbugs.gnu.org; Fri, 14 Oct 2022 09:03:16 -0400
Received: by mail-oa1-f42.google.com with SMTP id
 586e51a60fabf-1370acb6588so5732124fac.9
 for <58513 <at> debbugs.gnu.org>; Fri, 14 Oct 2022 06:03:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=rDx2qS7ai49kkCaBx32t4XPjK1HcudziiBXyALNVekw=;
 b=nesOo3BOInRu6Mq9d5/NSNBHD9/z7BowkU1ahfYjj9IYEFLzxEe/5Ferlu2heJhaMr
 ypzSvrgT3mHb9wmd5easc8rIjtzGV+GSWAdl/a2cYBwT6m37WMhgyruXwKS7YkkzXq6M
 ULK1dgpvqUP/vi4M4KD343ePx3ivoTQc5zBf4ESRpvkNYp7uD/RbRxbwORIwwuHOdWA0
 5WGAc/KomLQbaLr8yEPojuf7ew20KPZcw72FifDL4s4Rrd4cA0FOI4oao6GVULeqyJgo
 nSBGlWA8OaFTVP8R+RABGhrmGIXCEW9nXI7F1NyOLZW8SMAQm1CJ5jYQug/6M7BUKX1q
 RcMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=rDx2qS7ai49kkCaBx32t4XPjK1HcudziiBXyALNVekw=;
 b=7guMI3HwJIfBtkp5qoZ/LsZqnscfrp5OYM/xxB2r+jTrQfJZa2oGX5uly5gdEDsUVr
 rbBTuky5cZvBVjoA29NazHhGWrAm2nmAlatFG7CFGVy+hSC8/nK2MVPiL12ElxL4dR3G
 WAg5CxQWeZoBD7mvuSS8bm6CFCI8C3ioESEGEwxxhOs5LRwSR2Vzuomk4SOdzWujJ2It
 D4rqmAZDuy70E4PwkfYGS+5Fv4Mz/+TcEs6xOxl41WXnvWP5HjCbYu03k7OybVyTMo8q
 p++Ng0VYM2CjCsQpRAWN20U6zjmswfPZ43rfykuAEdpM9RbCulGn/qEI54yYE4P7vhXG
 5blA==
X-Gm-Message-State: ACrzQf34YAOm+S8NEG6xtjXWgxBZpvHoODD2niXeQchLCpCc4aZcqnXQ
 Tg56Md8oCywCHb51xlguR9Sehie04sdEJ8j7KKYYQ7dV
X-Google-Smtp-Source: AMsMyM6OLng1gbgNbXv0JXaRB3sM7ojjP+NFZR14wuG0JWdFYAJuiFLTi1Amlyo0mg9oUp6wc2CJNQBkYfOTQt28yUk=
X-Received: by 2002:a05:6870:9126:b0:132:b724:e96c with SMTP id
 o38-20020a056870912600b00132b724e96cmr8444123oae.199.1665752590647; Fri, 14
 Oct 2022 06:03:10 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 14 Oct 2022 08:03:10 -0500
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <87v8om8tok.fsf@HIDDEN>
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
 <87v8om8tok.fsf@HIDDEN>
X-Hashcash: 1:20:221014:psainty@HIDDEN::MpKdKeQwlCelCNwu:5hgk
MIME-Version: 1.0
Date: Fri, 14 Oct 2022 08:03:10 -0500
Message-ID: <CADwFkm=b6yAKMzP3jObF55qC810LTUpm2--hRRuJ5yVX3Rp_qA@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
To: Lars Ingebrigtsen <larsi@HIDDEN>, Phil Sainty <psainty@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58513
Cc: 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> And we could start adding a symbol property saying that a constant is
> meant to be constant, and perhaps start warning if people change it, but
> that would make things slower for basic things like `setq', so I'm
> pretty sure it's not worth it.

Yes, incurring a run-time cost doesn't sound worth it, but we could
perhaps make the byte-compiler warn about it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 14 Oct 2022 12:40:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 08:40:42 2022
Received: from localhost ([127.0.0.1]:36151 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojJzV-0001pS-Or
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 08:40:41 -0400
Received: from quimby.gnus.org ([95.216.78.240]:46230)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1ojJzT-0001pF-Bm
 for 58513 <at> debbugs.gnu.org; Fri, 14 Oct 2022 08:40:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=eQJuNs00PRn88hRvvxIGH6taoXpIpT4kXSR6ivobyLQ=; b=OTXOWk8HU2kBftH3joB4v4xQ7W
 rZEiDqXFIkXc1ViCrAOQIuCzEtlJWMICnoQ5F9xsfR4xfqCB4bAgg0ZOS4gD1wJrSTVQ7Sg6SRQ0B
 B2qReQHxJWSg7+G8OnKZemiOmDPZVsuFImN1Fm8yKESV9kpLXrAUQduhYzkrUZzebg30=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1ojJzK-0005yU-03; Fri, 14 Oct 2022 14:40:32 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
In-Reply-To: <8fae3292e6c1b175853b557060d05487@HIDDEN> (Phil
 Sainty's message of "Sat, 15 Oct 2022 01:35:41 +1300")
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
 <8fae3292e6c1b175853b557060d05487@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWHX0hULyM/KiX/
 //9fL2cNAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDgsSKZC1OvMAAAHESURBVCjPRZFNi5MxEMen
 sivsbYU+4vbuwX6KIj4Fe9otm2DmpmyCM59CRBfsaZ/SBJNbpRM28ylND+LcfmTm/0IA/s8MzONm
 nM1nZ7iAITlrvM0PNwPCUMg8+Rgnf8uwcGQmN6Xt7Z3C8I5k8my3Zl3gta1fxePaxssN3CSKzafk
 4p2FNyEcZDABx3kCw07MwihfzRFqRrd0vtDVYIHEOjbE7t5byPRwcsao+yQdrDSDVVO87JDijZ7n
 0G9aOQwrMNpyf2kmv1wB6KnYDm9zWcEL1Zgs1LCPH/BYxEeEFEP8qR3QFhDTbNKqz2osPPv25aws
 3BNEz6EQa0XCbkoa6VWpFBCapSptpjqGLsCjNr1m3mq/kaTarlGOaLtPZG23qNLjiFJRPW7USYBW
 nQh3eKQEUjf5sDyOumva11B+L08jIyNEJfq1fPKMFkEKmh8A5zwLUKz4DYbu5RYwZSLu4oq8hgmR
 XGu12B6nN9Srmu9abAtoEgUrOefdFvQjH4P6EvJ9gobGf871e2oX56CJQ+Y9y/o9TFR53cpeZAwQ
 T5HSWPY72fRfyNnI2iZWDJAbpt42yAEZel2XQkB3jwh/dKf/5i+i6AE30+DuCQAAACV0RVh0ZGF0
 ZTpjcmVhdGUAMjAyMi0xMC0xNFQxMToxODo0MSswMDowMKTBsXkAAAAldEVYdGRhdGU6bW9kaWZ5
 ADIwMjItMTAtMTRUMTE6MTg6NDErMDA6MDDVnAnFAAAAAElFTkSuQmCC
X-Now-Playing: Jako Maron's _L'Esprit de Nyege 2020_: "Mde Prototrash Bobr"
Date: Fri, 14 Oct 2022 14:40:27 +0200
Message-ID: <87v8om8tok.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Phil Sainty <psainty@HIDDEN> writes: > It does at least
 one thing different: if you load or eval a defconst > for a variable which
 already exists, the value is updated. Yes, that's true. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58513
Cc: Stefan Kangas <stefankangas@HIDDEN>, 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Phil Sainty <psainty@HIDDEN> writes:

> It does at least one thing different: if you load or eval a defconst
> for a variable which already exists, the value is updated.

Yes, that's true.

And we could start adding a symbol property saying that a constant is
meant to be constant, and perhaps start warning if people change it, but
that would make things slower for basic things like `setq', so I'm
pretty sure it's not worth it.

We could use that property to make describe-function say that the
variable isn't meant to be changed, though.  But is it worth adding to
the symbol plist just for that?  Hm...




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 14 Oct 2022 12:35:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 08:35:48 2022
Received: from localhost ([127.0.0.1]:36130 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojJum-0001gX-Id
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 08:35:48 -0400
Received: from smtp-2.orcon.net.nz ([60.234.4.43]:51757)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1ojJuk-0001gN-2x
 for 58513 <at> debbugs.gnu.org; Fri, 14 Oct 2022 08:35:46 -0400
Received: from [10.253.37.70] (port=38100 helo=webmail.orcon.net.nz)
 by smtp-2.orcon.net.nz with esmtpa (Exim 4.90_1)
 (envelope-from <psainty@HIDDEN>)
 id 1ojJuf-0003MT-HQ; Sat, 15 Oct 2022 01:35:41 +1300
Received: from ip-116-251-140-135.kinect.net.nz ([116.251.140.135])
 via [10.253.37.253] by webmail.orcon.net.nz
 with HTTP (HTTP/1.1 POST); Sat, 15 Oct 2022 01:35:41 +1300
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Sat, 15 Oct 2022 01:35:41 +1300
From: Phil Sainty <psainty@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
In-Reply-To: <87zgdy8ug8.fsf@HIDDEN>
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 <87zgdy8ug8.fsf@HIDDEN>
Message-ID: <8fae3292e6c1b175853b557060d05487@HIDDEN>
X-Sender: psainty@HIDDEN
User-Agent: Orcon Webmail
X-GeoIP: --
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58513
Cc: Stefan Kangas <stefankangas@HIDDEN>, 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2022-10-15 01:23, Lars Ingebrigtsen wrote:
> I thought it was just syntactic sugar, saying what our intentions
> for the variable is.

Yes, I think "not intended to be modified" is the gist.

Whether or not modifications would actually cause problems is unknown.

> But it doesn't really...  do anything

It does at least one thing different: if you load or eval a defconst
for a variable which already exists, the value is updated.






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at 58513 <at> debbugs.gnu.org:


Received: (at 58513) by debbugs.gnu.org; 14 Oct 2022 12:24:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 08:24:03 2022
Received: from localhost ([127.0.0.1]:36114 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojJjO-0001M6-NE
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 08:24:02 -0400
Received: from quimby.gnus.org ([95.216.78.240]:46052)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1ojJjM-0001Lc-O3
 for 58513 <at> debbugs.gnu.org; Fri, 14 Oct 2022 08:24:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=EsHCven5NO6jjX2gMvGdoWda6bTVjtVqaJ5Qs9BIFHc=; b=FkM0zlMguVkws+maO+ZiBw31pU
 nt79b1AQmxXCpK+VVHksyZ18Dhjz9c6KxYdN1mmJbjt2Ma27S2WnfFxkN8trzdSm+VX9hTnmCEWhq
 Jnji2RGm36DFlXdWlxPcyPQbNe193ObsebWqHZEF52F/PwM6/5yICLM7f0etKesdvMqE=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1ojJjE-0005qy-3a; Fri, 14 Oct 2022 14:23:54 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#58513: describe-function should say that defconst variables
 are constant
In-Reply-To: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
 (Stefan Kangas's message of "Fri, 14 Oct 2022 14:04:09 +0200")
References: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWHX0hULyM/KiX/
 //9fL2cNAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDgsSKZC1OvMAAAHESURBVCjPRZFNi5MxEMen
 sivsbYU+4vbuwX6KIj4Fe9otm2DmpmyCM59CRBfsaZ/SBJNbpRM28ylND+LcfmTm/0IA/s8MzONm
 nM1nZ7iAITlrvM0PNwPCUMg8+Rgnf8uwcGQmN6Xt7Z3C8I5k8my3Zl3gta1fxePaxssN3CSKzafk
 4p2FNyEcZDABx3kCw07MwihfzRFqRrd0vtDVYIHEOjbE7t5byPRwcsao+yQdrDSDVVO87JDijZ7n
 0G9aOQwrMNpyf2kmv1wB6KnYDm9zWcEL1Zgs1LCPH/BYxEeEFEP8qR3QFhDTbNKqz2osPPv25aws
 3BNEz6EQa0XCbkoa6VWpFBCapSptpjqGLsCjNr1m3mq/kaTarlGOaLtPZG23qNLjiFJRPW7USYBW
 nQh3eKQEUjf5sDyOumva11B+L08jIyNEJfq1fPKMFkEKmh8A5zwLUKz4DYbu5RYwZSLu4oq8hgmR
 XGu12B6nN9Srmu9abAtoEgUrOefdFvQjH4P6EvJ9gobGf871e2oX56CJQ+Y9y/o9TFR53cpeZAwQ
 T5HSWPY72fRfyNnI2iZWDJAbpt42yAEZel2XQkB3jwh/dKf/5i+i6AE30+DuCQAAACV0RVh0ZGF0
 ZTpjcmVhdGUAMjAyMi0xMC0xNFQxMToxODo0MSswMDowMKTBsXkAAAAldEVYdGRhdGU6bW9kaWZ5
 ADIwMjItMTAtMTRUMTE6MTg6NDErMDA6MDDVnAnFAAAAAElFTkSuQmCC
X-Now-Playing: EQ WHY's _L'Esprit de Nyege 2020_: "Ride"
Date: Fri, 14 Oct 2022 14:23:51 +0200
Message-ID: <87zgdy8ug8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Stefan Kangas <stefankangas@HIDDEN> writes: > Evaluate
 this: > > (prog1 (defconst foo "bar" "help") (describe-variable 'foo)) > >
 How about adding a note to the help page of variables declared with > defconst
 saying that they are constants, or [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58513
Cc: 58513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Kangas <stefankangas@HIDDEN> writes:

> Evaluate this:
>
>    (prog1 (defconst foo "bar" "help") (describe-variable 'foo))
>
> How about adding a note to the help page of variables declared with
> defconst saying that they are constants, or something to that effect?

I don't think we know that it's supposed to be constant?  Or do we,
somehow?  I thought it was just syntactic sugar, saying what our
intentions for the variable is.

But it doesn't really...  do anything, so we'd have to start to keep
track of which variables are really "constants".  Which would then be
confusing, because you can change values to these as with any other
variable.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Oct 2022 12:04:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 14 08:04:21 2022
Received: from localhost ([127.0.0.1]:36066 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ojJQK-0000nY-Th
	for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 08:04:21 -0400
Received: from lists.gnu.org ([209.51.188.17]:58450)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1ojJQJ-0000nO-1n
 for submit <at> debbugs.gnu.org; Fri, 14 Oct 2022 08:04:19 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36158)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <stefankangas@HIDDEN>)
 id 1ojJQG-0004c9-Uw
 for bug-gnu-emacs@HIDDEN; Fri, 14 Oct 2022 08:04:18 -0400
Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:41504)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <stefankangas@HIDDEN>)
 id 1ojJQB-0007Pa-8o
 for bug-gnu-emacs@HIDDEN; Fri, 14 Oct 2022 08:04:16 -0400
Received: by mail-oi1-x22a.google.com with SMTP id w196so4778180oiw.8
 for <bug-gnu-emacs@HIDDEN>; Fri, 14 Oct 2022 05:04:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:subject:message-id:date:mime-version:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=TBEpPzSArlFPX2wzWB1Kd1r9yqAhb8kaI6urBytayRU=;
 b=lBqQ+24reg96z27p2F3SEV2h2qgsT16H8Oant0oap90whmeoYNAb4gilf+CDOBhs4s
 0NY06Vx3wDjZgqcJkgGfezo7ycNrI/0QX2rM6XdqrPDqqS4mf9RJBR8b5sdqOIKtx+Ch
 aL+LzEWkPAhJzY3I1pXKh1aSonLrlcO8PmykUDYO+LN9cYnmMsVVloNFHN4KYvU71a0P
 +JX7eFkylgToaPkbm7DiAGw03c5V8ffWYf+pzdFNLFptvf8vNOOGb0Q8b5RNosOSGe1V
 Np2rfLf11sAPAa9AG+suTnrBc2PCfsUcT61tDSkt/1jxWiBDb0rsK3OVH3q7a/RtmiUl
 dm3Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:subject:message-id:date:mime-version:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=TBEpPzSArlFPX2wzWB1Kd1r9yqAhb8kaI6urBytayRU=;
 b=nTZv+5gN+SkwO7bhYlI1VDQwpv8wfIB73bNBOosfmNpbDvCHW4pN/ffJDk74sEYrPq
 1Zma4q1Wd4n1DCW529RJKXr1ZvdqtzwQDOCYk0sQLDtCmGrlvh6qvb7ACEcn7hing5iY
 y9eS6cwB7LiIn5V9EaP6JqTQGrwQA3D+/cwjsarou4A81gzjFsaaPSIZat2OHRJk/EX1
 X7a8C3bVl1VdFL2BYeEYgNtPHjsO+37dHSJvj1Y4pdG3wonC7g6BO+7qt1bScXLwyb6x
 DuomvjyNArNRn3Jl70OJzKEwZaj5/D454ZSoISNl4xazkTTg8lgWuTUEBJYOiHL8vyvP
 FKHg==
X-Gm-Message-State: ACrzQf0JlnGfi50dn2tPojFkQGamUHulag2GI+39bopCyyqdisFKAD3o
 dC97o7eiRXLdUK22TsRdpkgGk7h5vICIOgHMFI3lUaoj
X-Google-Smtp-Source: AMsMyM502xLZktVKW8lyyk3nWYbN8mNq8BxjN3ORWQn1ZkA8BWWaf0Dj+RBFrGeJj8ZlFWJcNPM/u5K0xw9YvYLgKCU=
X-Received: by 2002:a05:6808:1186:b0:353:b77a:a481 with SMTP id
 j6-20020a056808118600b00353b77aa481mr7143316oil.199.1665749049869; Fri, 14
 Oct 2022 05:04:09 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 14 Oct 2022 14:04:09 +0200
From: Stefan Kangas <stefankangas@HIDDEN>
X-Hashcash: 1:20:221014:bug-gnu-emacs@HIDDEN::yOMQt9PswazY1ZxA:qyQ
MIME-Version: 1.0
Date: Fri, 14 Oct 2022 14:04:09 +0200
Message-ID: <CADwFkmk7caBptdR45D0r1pjj-Htcs0Du_jfXOkrN1-EK5Tn0ew@HIDDEN>
Subject: describe-function should say that defconst variables are constant
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2607:f8b0:4864:20::22a;
 envelope-from=stefankangas@HIDDEN; helo=mail-oi1-x22a.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Severity: wishlist

Evaluate this:

   (prog1 (defconst foo "bar" "help") (describe-variable 'foo))

How about adding a note to the help page of variables declared with
defconst saying that they are constants, or something to that effect?




Acknowledgement sent to Stefan Kangas <stefankangas@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#58513; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 17 Oct 2022 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.