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 8f28a1b: Tweak `condition-case' keyword highlights Date: Sun, 24 Jan 2021 22:07:36 +0000 Message-ID: References: <20210124203118.16450.28084@vcs0.savannah.gnu.org> <20210124203120.0ABC320AD1@vcs0.savannah.gnu.org> <87o8heovpm.fsf@gnus.org> 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="6947"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "emacs-devel@gnu.org" To: Lars Ingebrigtsen , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 24 23:08:38 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 1l3nYj-0001hj-Oc for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Jan 2021 23:08:37 +0100 Original-Received: from localhost ([::1]:51004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3nYi-0000TI-N7 for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Jan 2021 17:08:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3nXt-0008OA-51 for emacs-devel@gnu.org; Sun, 24 Jan 2021 17:07:45 -0500 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:35984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3nXp-0004mn-Vo for emacs-devel@gnu.org; Sun, 24 Jan 2021 17:07:44 -0500 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 10OM5LvG003474; Sun, 24 Jan 2021 22:07: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-2020-01-29; bh=Ex5oERhIovHRR98UegOg2Zx4fOQ8c+9PAEDmjLux3RI=; b=bVIfm1wMnNjP7bI4nFJECjsdEr+hWfaQeoHh6zd62A1MN+KDUuMEiK4TwwsFiz9VM14M Iq4EDGLJezjty9MNh+uhESnTgfBn5bXx+np9EBqajZ71M8IsFo7WK3WO4Ps1bZWe3i7D 10PsdJYG2hcVUZRyoDbpGFaaGE75LF3V2p9uTotdLu08bYPm7/BwW9+tVRKXMw35AWUW G299oFHFHqoGGkqBvTSL46R6Ybg1w152atIUi9DRWExIiuxB6Wwt5ZbiEUTSSEDglJM6 Z1bfCl4g35wLzhQyLnHiG+FV8DvvLISidw1u31c8TqbVyHMdGN+Df0CL8hMEebiZ6Jcw rw== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 3689aab8bs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 24 Jan 2021 22:07:39 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10OM5xkl047602; Sun, 24 Jan 2021 22:07:38 GMT Original-Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2106.outbound.protection.outlook.com [104.47.55.106]) by userp3030.oracle.com with ESMTP id 368wqu7m59-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 24 Jan 2021 22:07:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GJ+99AYo4ETeP/OYf2HZq3ECchE1ZRtHj9R2axEu2eUQ/PVbNBwXRRMeTCZbLN+LFss6xjC+JIW6JXvEpuySCBz9K33kAAtI6NywCyCZtKiYmlPV903gJLzHsdergHgvrcrUAzFeZ9FWd1DUIv30QxpKWQLLKgOhQ1mZocmcFPT012HX8eS7X1EHhfseTVYuK4/Pc2sL/zSYH4J8aVl1KglBHQjmK2TWM9LnlAsrF5hm0Gd7QktsCYHnpt5xBJZ2g/JGx6SSRWFsvIWcqqvfe4qkOWovta7OAbpjYUyYumzXI34hpAYchJL9l2pJ5MqtFSw0q1qKfl8Ynm9pWLrF5g== 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=Ex5oERhIovHRR98UegOg2Zx4fOQ8c+9PAEDmjLux3RI=; b=Wkcfqsmh8VUyb19PVaHK9d/VL497D/aERzqUmqsdzVT2mfBL64/bVtV2HcKGhQNV4Nsc8Kx2Vp0UkgcIFzXfSO8zyrD4CdzCRG7T7UISzzNUD1DNBOki8V/9QxAsXPO9Mson7VQ/AhnlNyM8qzPxZMXmlpqRB4cLSCX5OCWsDxgp03RAnwLqKUzCyrfgUX4ZUxrDs1/mn4tzY8+6GL3lXwYDH42/HeTwfjB4jsw/k8wL8Y96yHMgahrH/P6lHRCDBPHWDr7gObWtBo1rnseMBjhPV/KKE5TXQ/eBKp8MzYf3qJrtIJKLNXzelsmg52V5bT3fTmjjE894mdvx3Uh++Q== 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=Ex5oERhIovHRR98UegOg2Zx4fOQ8c+9PAEDmjLux3RI=; b=KOMPvMi2vp/J+TmVQUB1l+dT2pAI6/ZZPXLUnW7Bck5WBTJNp92OdbFCFtu6lXvk2YESuqaoiK5GxVcrEcbmR2+esp+OgkfD9kT+qlKXpARcyFafWnsDCvd78pN9yYhzMTAkIPNyFBNkHuGH/n5257MG1EZEUpTqHwwqihNbWtA= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SN6PR10MB3071.namprd10.prod.outlook.com (2603:10b6:805:da::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.17; Sun, 24 Jan 2021 22:07:36 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::dc4d:9cd0:2010:daa2]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::dc4d:9cd0:2010:daa2%7]) with mapi id 15.20.3784.017; Sun, 24 Jan 2021 22:07:36 +0000 Thread-Topic: [External] : Re: master 8f28a1b: Tweak `condition-case' keyword highlights Thread-Index: AQHW8ppWnH5H+ZmThEelqJip7M9746o3U1gw In-Reply-To: <87o8heovpm.fsf@gnus.org> Accept-Language: en-US Content-Language: en-US authentication-results: gnus.org; dkim=none (message not signed) header.d=none;gnus.org; 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: 18616afa-bb41-44e2-4ac9-08d8c0b474ec x-ms-traffictypediagnostic: SN6PR10MB3071: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: T63RxntUevolSvnugAXEqocY4Q3WbnqvIqlhQ8qVhKeaNV4sreAp5AxeZoFk2zSB2/f6lQIWu9IlaF0oRtgClTfOSX/p0dQUHS+jc10AJlYrm3qKJ2uPsGgWmZp/QxAsLmLhGVV4yqrJhojsPHYRvA74eEPWVpLwRCrHi+N1EeVXKWJm1pb/iiawihfcucvZY+optJ8Vi6yZ9CH/+PgRVUWYBBucD7OifDaNlIMAuRtZHTFkHGsKUX2x1EdeqPHkbo3xWGa3/4sp6KNcpD/QAZaG49p1LKUWcXNhQONhcGQxVPydpg+Ek8AtLXHkpnu8KOV+nFcjeB/8iPqgRVnhtagI2ImcIKvgMQWWnYeuxFveDQRmW2KReeFfSy0ubc51uj0bzQNiEVdA3jTO0mQgzY4+J6EcVPefmHd+gs2qPsjPy71AZrgyfELmtXenm/aNVFvlTsuMKw50R5RTZkIytoq6FDeoPwNUVE4h9NsjC06BvZNUY3B+MerFyZJl+wWsypWTEIkEBfAPcywS2X8ErwsbE+GLNvZXbOrijpRsMNEOtgjK2xy0mXgObz1vyveYGUU51jsfxIHZMQ0vH1NKLgzvSNaLOIrVz6ukhQxtgB8zmfQhX0gn6CCXwnIopdHMVfA0OTCELXqSZI13czqOpg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(376002)(346002)(39860400002)(136003)(366004)(66446008)(66946007)(8936002)(6506007)(76116006)(110136005)(186003)(86362001)(5660300002)(8676002)(7696005)(966005)(66556008)(66476007)(478600001)(64756008)(26005)(44832011)(9686003)(52536014)(33656002)(316002)(83380400001)(4326008)(71200400001)(2906002)(55016002)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ykIXgmYS1cvSLqmqiAcH1Rgjj3HSli3dGQIGJIPVvuibNzUotoYEkPw7bUKO?= =?us-ascii?Q?Sop537u2t0szV/uL3GnmhZEzjZnHQmyNg33j+1Sw6WyESH3WtjdO46qEw1pu?= =?us-ascii?Q?DBu2Z3Q6Gt/AGH2xgwguXxOLPtbMMSDCHUqkUszP0AEdHfY2Q6zRLIs0TwJt?= =?us-ascii?Q?ouF9t2FgcCaDxZQFSRZ0rHvwDxv76ax62aTFXGT7jRSESgNyPZ7+onemFb2o?= =?us-ascii?Q?hG3rGLcTTTsG82rcrIlqy2jEabn5YR/uSgb6WDygWz/NIYonqye1OCGqD84U?= =?us-ascii?Q?k6E1Dt+OOATyrAi6DVsof8/Y3hB7c0zHVWpMWXuH9UjDTvVhpfGgPkbJwocj?= =?us-ascii?Q?j+Z+eheCvZKwzkffx+nDJA/wX7tPR3mo5JI+oGBYuZ011j3HWOyiZdF6Q6s/?= =?us-ascii?Q?v6vuGuz+N4UWdrFqub0zln7BgiX/SJocfEOJE2aaPFtseJzFsNsllU1zhOCL?= =?us-ascii?Q?eET7sWj8a5x6eQakUUT+es/wt0T22UpRVVzI6MnHeE1XBRMzx/zpW31I6gsj?= =?us-ascii?Q?3/+QAB6nQ5oRymdbjyjs7cEPrRiaiOI24/6Gmn2Mum5b+L3H47z+iJd9V7JS?= =?us-ascii?Q?RApROjRKxUcAT8nJmAHrBo2+92smGDkN7B3xWhMbjBwl3UUFSATCUsADzwhB?= =?us-ascii?Q?2KyX x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18616afa-bb41-44e2-4ac9-08d8c0b474ec X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2021 22:07:36.0238 (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: 8t6eRea1ndIZ23NOB23n5xXun99dsYuGwYRNTUWvOsVjhZXbFXYuCWh+QIGM/c3RdBbnuiAE8jc6st78qhhK2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB3071 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9874 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101240139 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9874 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101240139 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: 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:263361 Archived-At: > > FWIW, I'd be just as happy if `when` were highlighted with a keyword > > face in this case: it's invalid code anyway, so the only highlighting > > that would actually be helpful is one with some kind of error/warning > > face, but I think it's best to leave it to `flymake-mode` to do that fo= r > > us. >=20 > Sure, I just wanted to tighten the check in that function to the actual > form it was checking, instead of including the VAR form, too. Nobody > would actually write something like that. >=20 > But speaking of other code that's mis-highlighted still: >=20 > (defun a (when b c) > ...) >=20 > (The `when' isn't a keyword here, but it's font-locked as such.) >=20 > Couldn't we just use `edebug-form-spec' to notice that the arglist isn't > a funcall position? That would get a huge number of macros/special > forms with non-funcall positions right... > `lisp--el-non-funcall-position-p' would have to parse that, though, > which might slow things down? Indeed, such names shouldn't be highlighted when they don't appear to be used for their defined behavior. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D43265#42 It hurts, more than helps, to highlight a defined name everywhere. Yes, it might be non-trivial/problematic to correctly detect normal uses, but at least some first-level approximation might be helpful. Blanket highlighting of such names can be "considered harmful". https://en.wikipedia.org/wiki/Considered_harmful