From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: [External] : Supplying DOC string in a `defun' using `defvar' Date: Wed, 2 Jun 2021 15:53:31 +0000 Message-ID: References: <871r9ly7v3.fsf@web.de> <87r1hlw6pn.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29715"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "help-gnu-emacs@gnu.org" To: Stefan Monnier , Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 02 17:56:15 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1loTE6-0007PF-T1 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Jun 2021 17:56:15 +0200 Original-Received: from localhost ([::1]:33998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loTE5-0001iU-VF for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Jun 2021 11:56:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loTBf-0007um-52 for help-gnu-emacs@gnu.org; Wed, 02 Jun 2021 11:53:43 -0400 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:37978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loTBc-0002RG-JO for help-gnu-emacs@gnu.org; Wed, 02 Jun 2021 11:53:42 -0400 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 152FcCM8011825; Wed, 2 Jun 2021 15:53:34 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-2020-01-29; bh=F4Tkl9BcSI4XyUC+5yOxogSqQI8zivp9PA9g4+AFxYo=; b=s1xYwIH51bOWr6itMdxQ6x0miAK2bQgfs9nLzk6vSao/i+3hw47wpPYrJGQ36dkCk8+I /xV90n17DYdSPvl+8wk8bd4GhKzSroED1majmLPpE1dPEBiIRnFd1uJsoOO/HcHyVnOK 8dtbiVdbSS+QiIBkKNlh5+MhWI6YdhYfiQjfW00ubX5C1e5p4Y1fh+rD6e2rTjkoUbwS doj2BvAXskMIUSXf1yLb+C88moDk6Yr5pOgfypniZEJnh6WVD0lBgGRHu7Gu2eIPLd+7 LURm45fdETQ38DUtqy4lhkbj/7t8hYBcmHR9WcsGe4wpAUIrTliQwXi44remUnsW9/vB xw== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 38ub4cs331-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 Jun 2021 15:53:34 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 152FoeFf092849; Wed, 2 Jun 2021 15:53:33 GMT Original-Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2107.outbound.protection.outlook.com [104.47.70.107]) by userp3020.oracle.com with ESMTP id 38x1bd16d0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 Jun 2021 15:53:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gNc+CzSpMCwyAlGhAiyud8wiilwC+lS+hMXCuEiI326bwMYC0aEAyHJgFmvqIbHnwKBEWCkV/mZACDotG2VwPlPfT+TmhFma9ujg4g7lP2ydXh7MO9hwjTHBPK+ArfLC26EFUktseUrSEAuh4ljkKA/hvZuKEmtonjB7Jsj2ouzXAtzokFxp531ak+vrSlXOWsV2XTQkB2zjzc4tQiAIgm9UehjeWEwXwXfLlU+MEEFH5VVPg8HcryDwkey7j1Va26x8m/KmqyauFIShl6VimdO5YjbigQvsxyX3isIeh8h5USXUsfJZFMHrzrYBXB8UO4PK/mHDmUqxDwDbOnve3Q== 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-SenderADCheck; bh=F4Tkl9BcSI4XyUC+5yOxogSqQI8zivp9PA9g4+AFxYo=; b=N5vhS3OM5o/Ki//QNqif15OT8cyi3ji1mAsF4f5TJ5+P62YkRJLrLee66/BqDrhtb99fDzu+xzDr+7o6LkU+QophKygAICRL5KjComn66OVMztHjTBtlV1R9hZ32sPmnhOujBkW26jQd2GX0/1Ze/YQ3IFebLsaTL6sfaE8GYmnMRamKcrTsz60TurH2w6Fam5p41ELaPI6unuw6pNNHBI272EKRJTyCoGkocrykl76jRAzoJvFTrGrj3rvjCEsUsZzA8Rvl0O9iJmZc7rAm1BlbB5Nqsp0ELGyK1idXk8FTTmgVJ9oqaK4Mm8ZkgpDHa8IDuPoGTTnEP8BeC9Jlew== 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=F4Tkl9BcSI4XyUC+5yOxogSqQI8zivp9PA9g4+AFxYo=; b=kRgHgSqd8PPNF9Ta3E35XzOqq9/f0VQy5qJ9mxgY+xNKMv4liD7/lq6FkhUBiBdc/sRVihlO4+RQPOv6xmLWy348QBAVdLCvGahFD+ew0z7vt+tX9nXusu+E/Y08tFZDz3P3xTgnN9UYmmpqy25Cga51y9zmJNhHnlqfU7uv4ME= Original-Received: from CO1PR10MB4466.namprd10.prod.outlook.com (2603:10b6:303:9b::10) by MWHPR10MB1823.namprd10.prod.outlook.com (2603:10b6:300:110::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.20; Wed, 2 Jun 2021 15:53:31 +0000 Original-Received: from CO1PR10MB4466.namprd10.prod.outlook.com ([fe80::f8ce:e306:cfd7:6f9f]) by CO1PR10MB4466.namprd10.prod.outlook.com ([fe80::f8ce:e306:cfd7:6f9f%7]) with mapi id 15.20.4173.030; Wed, 2 Jun 2021 15:53:31 +0000 Thread-Topic: [External] : Supplying DOC string in a `defun' using `defvar' Thread-Index: AQHXV7CZ8DymPTXqI0O/6Z8VPx1al6sA1C1Q In-Reply-To: Accept-Language: en-US Content-Language: en-US authentication-results: iro.umontreal.ca; dkim=none (message not signed) header.d=none;iro.umontreal.ca; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8d82fcec-65bd-4af6-b269-08d925de9218 x-ms-traffictypediagnostic: MWHPR10MB1823: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oYSixSnNMnfKN/JE58MSafWvfGO7Ty9XA819X8UT6bJn0Ot7fx78BA6jY/NsXfdgdPGj5GgnQi4Hxyyc44WW+39U9Zcr3zdDBfGwRI9FkCoKZk7p3HLElD048I8omPfLvxqdWKN73pJsYbpjwQCkSi0j4g8aN2+hTljmVL7uYuZFxgi9WFVwEKrH/bSrY0K+57tMc5RA09RG8oTsZpLjQfoRX0pN0kPC7Dx7YgXtjWWWwCW/BDmgcp4qiAHaz4Y2WVGO/KqG3LkRf48WapZTc5q8yw7W7XJv6Seyy9VPd9rPL/qLM7f26BxwXETxBVgOZbz5w1Of0jTjOnBobrw0DKUfzQVSDM5O5xhmdC90DbivwWqDZEbszIfd2HH/P3fyybP5Ia/w9V9UrR0cn193mLDEGKLaHJooFOfuN9UbZd/mcA1QnQSq9USzfAFK2lwNT4uvHqZP9fSYMaInwA7jiJ9dDGyh7IFa8Mv8ZLOl6LgFxxdwkYKB/yXOfQP1Rei2TpxR/H525rko5YWTFyh1VaHDYNDzXaXfKt00ENiZb3B/UxmOIkvJUqLeS31Lij1rWdOLQc56BlSNk6FiP8xVdl53UTJAT8fg4p/ssHH73BIzgB8Y2+WSawKZEAZp8DjptCQAn9KuasOaH7NbNK647A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR10MB4466.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(136003)(376002)(396003)(366004)(346002)(4326008)(478600001)(7696005)(83380400001)(8936002)(8676002)(122000001)(38100700002)(71200400001)(44832011)(86362001)(2906002)(6506007)(33656002)(5660300002)(186003)(26005)(52536014)(66446008)(66946007)(66556008)(64756008)(76116006)(55016002)(316002)(296002)(110136005)(66476007)(9686003)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Q1ToOYQ8n5jUH41kfukUSepsJs2NmrkLuwYWlDmYIgA5Q6cCkbRRliaqtML1?= =?us-ascii?Q?YSS8V18aqQQQgFGVHHd9kMq1Qg4eCHUh/hcY4hECQg+14qbYc9YRN1daFy3N?= =?us-ascii?Q?tMhEpnirRj/4hHneHxDa5IZri7Wwz5cm1t587Q+AswXL9E2q3Siz/w0+VdvR?= =?us-ascii?Q?zQi+meFl2F4/I6BbsTQAdxWH6kfKaSHcyvffLFHM3DGjCEIJap1xvMN68vZh?= =?us-ascii?Q?ll23ZHNsHv671YQ/s3U2oCFKLwpnNnw2EKZqvJWFluuaiVYaApwN8H5LhGOA?= =?us-ascii?Q?YurC9vdOrD7dvMXysP5E5iClpXHL6p+i+TNG+avuwfXXS2Fteq8Y/hOf6cSB?= =?us-ascii?Q?M3XsVORzKlJzP0y5a2c8MktBgGoHFbdhfBtx3MgL5lSy3bFUKHUd25MI3YoD?= =?us-ascii?Q?8ofDe/OpOqekOzsYz5+yIcsMphqH5PPUcb7cQw0hnTNCO49Cvl5TkKbDX2Du?= =?us-ascii?Q?U0OR+gygA7ibJ2RX7uXCDOn5cVmQV1GpPzFO083jksPnk4uWo56f1lqHYQsO?= =?us-ascii?Q?Qp6R/f1jejnBeSnIkNNw0cWLIT0admIOAMZNfzzmlZrtG0xQr3nlgw91Ntr3?= =?us-ascii?Q?lXr1W0+iTKrF/74WZEJ2QjFsDkjKQ0xfW3aS9BscgWzEHol7SWT0s0basmbS?= =?us-ascii?Q?1GMf x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4466.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d82fcec-65bd-4af6-b269-08d925de9218 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2021 15:53:31.2152 (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: ln7ASCjF6eLWHUf4Bja1yQEjs8zwZLvLUSYGM+G4YVKaShQa3LIyY/8ktmcUZ4GIzp6fQG3SlvzMLwDYM0MW4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1823 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10003 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=799 adultscore=0 malwarescore=0 mlxscore=0 suspectscore=0 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106020100 X-Proofpoint-GUID: QcLXHrnfRFs7QkGYh0CwnqwipQnJy3ug X-Proofpoint-ORIG-GUID: QcLXHrnfRFs7QkGYh0CwnqwipQnJy3ug X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10003 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 adultscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106020099 Received-SPF: pass client-ip=141.146.126.79; envelope-from=drew.adams@oracle.com; helo=aserp2130.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130503 Archived-At: > > From my point of view, the docstring should have=20 > > nothing to do with either dynamic or lexical binding. >=20 > No, but I guess (hope) that your "No, but" really means "Yes, but", and that you agree that it _should_ indeed have nothing to do with dynamic or lexical binding. > it's a new language feature, so it makes sense that=20 > you need to use the new dialect for it be available. I don't see how that makes sense at all. It doesn't follow logically that every "new language feature" must work _only_ with the lexical binding dialect turned ON. As you say, the "lexical" dialect supports both lexical and dynamic binding. And other things being equal, a new feature should, likewise, support both lexical and dynamic binding. But it doesn't follow that a new feature shouldn't work with the "dynamic" dialect, when no lexical bindings are involved. Regardless of the "dialect" used (i.e., whether var `lexical-binding' is nil or non-nil), there's nothing in the example used in this thread that makes use of any lexical bindings (beyond the binding of local variable `x'): (defvar my-doc "Whatever...")=09 (defun my-fun (x) (:documentation my-doc) (+ x 42)) That lexical binding is available in Emacs Lisp now is a good thing. That both it and dynamic binding should be available from now on is a good thing. And turning on such support for both by default will also be a good thing, when that happens. But that users should be required to explicitly turn it on now in a buffer where you evaluate such an example (which shouldn't need and doesn't make use of lexical bindings) makes no sense at all, to me. But please let me know what I'm missing about this. At least such a requirement doesn't follow from the fact that `:documentation' is "a new language feature" ... unless you can show that this new feature somehow requires lexical binding support even for such an example. The question, I think, is why shouldn't using `:documentation' work regardless of whether lexical binding is turned on for the current buffer? > You get to choose for every ELisp file which > dialect it uses. Emacs turning on the "lexical" dialect (a misnomer) by default, so that both lexical and binding are supported out of the box, will be welcome. Until then, "get to choose" should really mean _get_ to choose. It shouldn't mean that in order to use such a "new feature" you _must_ explicitly turn on the "lexical" dialect, even when no lexical binding is involved. For now, the default is the "dynamic" dialect (also a misnomer, as you pointed out). For now, new features that don't inherently require the use of lexical binding should _just work_ for both "dialects". Unless I'm missing something... Does this new feature (`:documentation') inherently require the "lexical" dialect? Is such an example, which makes no use of lexical bindings, inherently incompatible with the "dynamic" dialect?