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.devel Subject: RE: [External] : Re: master ff4de1b: Fix quoting style in Lisp comments Date: Sat, 18 Sep 2021 23:22:37 +0000 Message-ID: References: <20210912165141.9491.52637@vcs0.savannah.gnu.org> <83wnnhacy4.fsf@gnu.org> <40937e22-994f-466c-87be-4f70a522118a@yandex.ru> <83o88t9kgb.fsf@gnu.org> <9672aeae-a969-1526-003b-abb1b00b5b49@yandex.ru> <87sfy43dlt.fsf@gnus.org> <1a0f9230b7d75e426474@heytings.org> <1a0f9230b71c3d2eff86@heytings.org> <835yuz8na8.fsf@gnu.org> <1a0f9230b7571d4c3293@heytings.org> <831r5n8kqa.fsf@gnu.org> <1a0f9230b74fe15d1abf@heytings.org> <1a0f9230b76ce1574e10@heytings.org> <87mtobkknl.fsf@elite.giraud> 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="23404"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuri Khan , Stefan Kangas , Manuel Giraud , Emacs developers , martin rudalics , Gregory Heytings , Dmitry Gutov , Eli Zaretskii , Juri Linkov , Lars Magne Ingebrigtsen To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 19 01:23:31 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRjgB-0005uT-8K for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Sep 2021 01:23:31 +0200 Original-Received: from localhost ([::1]:38884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRjg9-0007HR-74 for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Sep 2021 19:23:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRjfU-0006c1-EJ for emacs-devel@gnu.org; Sat, 18 Sep 2021 19:22:48 -0400 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:44308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRjfR-00028z-Sq; Sat, 18 Sep 2021 19:22:48 -0400 Original-Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18IFKO19031247; Sat, 18 Sep 2021 23:22:39 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-2021-07-09; bh=wcuJNn3yTF0ZBn1GLkix4wuoqDLxYG8m9aKFJGniiHA=; b=OYHC4MyApNYCiGQV62Ex94LYZV2kNX1CgO/ztTFS0OWus1TP+UKCvYGMIa5yNQMny1ui Aia83pNEzP8HbIx8As5GO3BF1ELnSxdaNbvZoSf/CvXJl9Cf+rO6lfspMH1IeUKpOu82 567Wgvuj4Ecx8XhquVc+vV7i89cunQ0CqNfgH9Y9eKNJoBf8oU1JhGuY7bFRr10zjhC1 q5b0ivuPpLByjJHrPJFJgJsgoUc1UrzBNDBgXj6Q3zI1XoyJrl+Fkf5wRiS//YgY53xt XrlT7Hs6odKTjY0QLzeGUbLKTAYkHItY+GYiyxxzOz4rfFVcMkV1AnwdM15uZBd6c3fU cA== 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=wcuJNn3yTF0ZBn1GLkix4wuoqDLxYG8m9aKFJGniiHA=; b=l6UDaS7AUsztkhLc0KmY7Yh2/OFQeHS8Rjb8U2yZiGcJSv3usG/LDwNeHxVGmQ4HjzZP bmhWF1klUJHeX36YXuaGghq9Vevh1vwADbHzUXHIxDDEhjregNWv9HG5hz8NNa0EXDfq rH2rl63UHwVAwIaDuVRjqF7x1fVLJ9QYQX7CAYwt+J/JcFuyMOcKNIxpGsabsPwOV5XB brKfZNON6UkFFQitLxKcDDKFZNA3auSO4KDj55ViuIvTWZq8pC5P/9IQOr+5IrT14QNJ s9n5qv/UhvKdvCPpFBRGc+RWYnXhUKMYNEy45Mwq3k/C5mbEHsL/qrRcrQEK68tLtH/R DA== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3b56hcsj4c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 18 Sep 2021 23:22:39 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 18INEnTh182035; Sat, 18 Sep 2021 23:22:38 GMT Original-Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam07lp2045.outbound.protection.outlook.com [104.47.56.45]) by aserp3030.oracle.com with ESMTP id 3b565b7tnk-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 18 Sep 2021 23:22:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f4+aq3OJGOsKsS/e9V1ryUPcESU5++sboP31lWMxU5NX2dNjyY6Gay20OhWIqPR77MM/RAqGmhoG4s6vIWYS4IFF5PcKs6jJ0wjBHMz19VLPQ5UErFh3YUPhPkm8nfN0PL6XfZBTMDKP+/nc5717lL22uE8ScOHFMgYrfnG33ZH7StGF4oY/57qK+J7gq6NwF/9JxlH3NJR/GGyGZ6ae4RytWvo3zg5b9Uy6Xyuoj/HwCir7IuqzCUmgWJh7Nai2QBo5QISftWPIZzX3RA4Ak46qrIfH35K7j30tsljr2Fbd41uU50QjdXUfsTzrd946ZByGlfmP6PmoS5EFydsNzg== 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; bh=wcuJNn3yTF0ZBn1GLkix4wuoqDLxYG8m9aKFJGniiHA=; b=hxF+FwknuzOCB6Kbj2cpeCimJ0UEnZonB6ndyKTtvkf/+enQQ5/PmfcpidLr/WCZ0hdoQb8a4IpRVUHAPFW4x/0gHzkXN8uGpLycGhUMDlvz1l+rcsZN/02yBcytgK6Vyl6islrfQOENDw+D0E/ZgiYKiitqZ1YcPyw6IUmrt5TIlWpQMuh5wgb5bkzC6X2R/lBHnROVUdtyg6kjOlbHbbN+lXghVILp2rBAwJ18UvxQsMGgswgpIMCG3l6rFosnWyyEP+6CFh663SF/M05wFGYy6ByVLJ8iO7JCf9LwGuAaB6ord/GBgMkICuL4wad31pKCh5qwi/xCz67rnp9SrA== 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=wcuJNn3yTF0ZBn1GLkix4wuoqDLxYG8m9aKFJGniiHA=; b=KHpatoJW0iFVd1/qMYNcufO0d5EAF2dmpAEHCmGcMu8Ar2qTEINNoQmJNMaRvfeQSXUkm48fUEBDbrECYOL2KdlWWsZaCi1DtCsJ33C5GgWByRRpxRoHKQvu8qv9CRLe11ZjCuqpoUTSM9v+iq58mZvO2pNRHp5L00X5i8HtXcU= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BY5PR10MB4290.namprd10.prod.outlook.com (2603:10b6:a03:203::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Sat, 18 Sep 2021 23:22:37 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82%9]) with mapi id 15.20.4523.018; Sat, 18 Sep 2021 23:22:37 +0000 Thread-Topic: [External] : Re: master ff4de1b: Fix quoting style in Lisp comments Thread-Index: AQHXrLIkAPoToEH9UUuBtB+kfILNRKuqVaPw 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-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6e9515c1-f03f-4331-d98c-08d97afb3414 x-ms-traffictypediagnostic: BY5PR10MB4290: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 12GGWDiJd5GlRsBJbcOVOymoYhBKTFXJ27/kLl2j+X0L7ybNVcaJoAsgJD/7BcuMepk5ReAIajgRaoUT8/wziEHWWUeW4dHYc5ht8MXWqjwWkN1v2S31cy5SzyM7PfgWQ0vP/d1w506YRSG7np9g0VBu06TL9lozu1QZgyGgVrnzYGvRbk9CePq+nflVIdoCgEnQ4QYUuznDw9LhBjtAzFkVC+7VQUs3hxAQ8BPdQuRPWW7v3jCKI3Ngv6WOwo6rXCZwnUPmG9J/7sBOjpnoqbwwRD+QvjVWXweU7+289aroRDu9waLmZLSaJ8UsScGwuiUukoQda22L48LTQHDBDdxxjOrKztvShYsIIScDF48fM9BMpRXLWk5si7MvTgwCxBpEQlJaq6IaRJVUbToFx/SMOTS5oi5arw/zQg0N/qS+0CdTqVJCBoTifEicFqFjhoQ5LhirGNT4I6ip2HzV5AcAU5uRcITulFvS0FFxYNWtw61AcAkQ3in2DbKfdES4qB3fSzVDH4aa/bDiPiHjspReiIiYedb88dqYBnf7L8PojyMgJe5Fd7svcToLGnViqbk4+Xdfh1o9i1No1xgch2I8Id3TOaDe/ZYzusXQKiZI/hMnqlC6wjvPDWpZIzHSkaQSQAAze7npcTr8yXwKwKzcGPL+OSGd/ALhIB+7iD2ExxOGbpdTFbcaOQ5TzZHHsG9MZwMjQxlRAwKdAMOMDQ== 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:(366004)(4326008)(52536014)(71200400001)(9686003)(8936002)(55016002)(44832011)(83380400001)(76116006)(316002)(296002)(66946007)(33656002)(66476007)(38070700005)(38100700002)(122000001)(54906003)(508600001)(5660300002)(7416002)(7696005)(8676002)(6916009)(186003)(26005)(2906002)(6506007)(66446008)(66556008)(64756008)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?A3Vja7QdIRLcOICRV3p0HHKZ3im0+aKSI6fSiYu68ikJwyuRRzg3YjCUf2TI?= =?us-ascii?Q?ME+nLCzLcJZjqJwrVSMaGRanlso+lbptUQHc0pIfk+PMqoXdZEf87lFPGcyw?= =?us-ascii?Q?O/3p+Z/hxSil3unCI/9gfooBb6tCUzDCugvJmppzYLMwkBjTpGrUEdMgQ9je?= =?us-ascii?Q?WlXD9WKgfXiLmhwhCgbTk6AJTMaa90BozbQ2aJ0PC99U1I261Im7AzCG6OnP?= =?us-ascii?Q?qkjq/hKUUYCIIKFnrXX00gjRvrme4RjieBGqZKTnWVEWC/9wNYryALAKURqd?= =?us-ascii?Q?KwC2to504SO4vm8mzkqZEc/BpFgHXjr7rc1hmSAkdh5CYB3DyHXWIiDsIeyo?= =?us-ascii?Q?kjXCBRbNTCK9+aNleiXR4ZswcMUd0OLKarCn1dKwZmoxqZd2b8LYIsturh23?= =?us-ascii?Q?IONmNp1+NA1zkKvLN/lepJqjXgN+f83+4utkANz+TKi08VyR0zOwkOEPPjxg?= =?us-ascii?Q?Un/v/AZa4ed5Ys5qda+jUSwwRCxNBMKkNZYOsS4i1h+3aIaBYJnwFPQ7zyOU?= =?us-ascii?Q?z9Adua8UYYmeE4SHESFryySWRbKU01T7twPmfnW3wWhspld4fKcy9LDY9E00?= =?us-ascii?Q?tn6uwNqLr9yqi2SMpnENBBhqDovgT1RoDLCBJbR7nxJkMN9v3OdaUKIXPa6d?= =?us-ascii?Q?wP x-ms-exchange-transport-forked: True 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: 6e9515c1-f03f-4331-d98c-08d97afb3414 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2021 23:22:37.7911 (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: I/3g26ogkgqa+ksZmEZd6vbzfnf1AfBOdaQUNn9wFZWqXskVE3xEibBHjfUeQ3yWql43DItTCmhQ4cpdem4ang== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4290 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10111 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 malwarescore=0 mlxscore=0 suspectscore=0 spamscore=0 adultscore=0 mlxlogscore=914 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109030001 definitions=main-2109180164 X-Proofpoint-ORIG-GUID: u7A0FIJaiYwLbhIN7Jv-Y4Nme0rIH-RV X-Proofpoint-GUID: u7A0FIJaiYwLbhIN7Jv-Y4Nme0rIH-RV Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L3=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275036 Archived-At: > > > > it is useful to have distinct characters to > > > > represent opening and closing quote. > > >=20 > > > The usefulness is that it resolves some ambiguities. > > > But those can resolved in other ways (e.g. by > > > disallowing newlines between the opening and closing > > > quote). > > > > Why would we want to impose such a restriction? >=20 > E.g. because multiline constructs are fundamentally > harder to handle in many cases, such as in font-lock? Sure, font-locking such things (but not only such things) isn't 100% perfect. Having distinct open and close delimiters makes things easier not only for fontifying but also for users. > Or because of things like > ;; foo `bar > ;; baz' toto Looks like a pretty concocted example. Ever seen that in the wild? We don't currently font-lock even `...' with space chars in the ..., in Lisp comments. (I mentioned earlier that we could.) I do that in Info, for example (but emacs -Q doesn't). In the Emacs and Elisp manuals there are plenty of occurrences of '...' where the ... contains space chars - instances ranging from shell commands, such as 'cp -r', to key bindings, such as 'a +', to font names, such as 'song ti', to programming constructs, such as 'else if', to VC commands, such as 'svn switch', to key sequences, such as 'M-x diary' and '100 C-f', to key bindings, such as 'C-c C-c', to patterns, such as 'C-x v r BRANCH-NAME ' and 'MONTHNAME DAY', to file extensions, such as '.elc', to menu items, such as 'Other calendars'. (Those are all from the Emacs manual, and there are zillions more.) But sure, it's more problematic to allow for newline chars. In my code (`info+.el') that's optional, and not on by default (except for "..."). But it can by useful, to cover things like these: 'C-x '=20 'MONTHNAME DAY, YEAR' 'ls -l' 'xdvi OUTPUT-FILE-NAME' "newline characters" All of those occurrences, and many such more, are in the Emacs manual, and they all fontify nicely. (And of course the same was true with `...', before the change to curly quotes.) I haven't done the same for `...' in Elisp comments - only symbol constituents are fontified there still. But more could be done. > where the opener is not in the same comment > as the closer. Yes, that would be a minor hiccup. Fontifying would need to disregard the comment-starts. But as I say, that's a pretty uncommon case. Font-locking need not aim to be perfect, even in the default case. But best is to make it easy for users to switch among different degrees of font-locking such things. By default, `info+.el' fontifies all such quotations. For all except "..." (strings), it does so only if the pattern is all on the same line. (By default, <...> text is also fontified.) Change the value of an option to get multiline fontifying of all such. You can also fontify isolated backquote and quote chars, which is helpful for Lisp code snippets (including in strings: "the `foo'"). It's easy to change such behavior on the fly.