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.bugs Subject: bug#43265: [External] : bug#43265: 28.0.50; Inconsistent fontifying in elisp-mode Date: Sun, 24 Jan 2021 21:58:34 +0000 Message-ID: References: <87mtx0ydgp.fsf@gnus.org> <87ft2rv6j7.fsf@gnus.org> <877do2qf8h.fsf@gnus.org> <83v9bm2j36.fsf@gnu.org> <87y2gioztq.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="8759"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "43265@debbugs.gnu.org" <43265@debbugs.gnu.org>, "maurooaranda@gmail.com" , "monnier@iro.umontreal.ca" , "tsdh@gnu.org" To: Lars Ingebrigtsen , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 24 22:59:16 2021 Return-path: Envelope-to: geb-bug-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 1l3nPe-00029x-6a for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jan 2021 22:59:14 +0100 Original-Received: from localhost ([::1]:44476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3nPd-0005nj-7t for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jan 2021 16:59:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3nPU-0005nZ-1R for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2021 16:59:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54136) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3nPS-00021R-EC for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2021 16:59:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l3nPS-0000CK-Dc for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2021 16:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Jan 2021 21:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43265 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 43265-submit@debbugs.gnu.org id=B43265.1611525526731 (code B ref 43265); Sun, 24 Jan 2021 21:59:02 +0000 Original-Received: (at 43265) by debbugs.gnu.org; 24 Jan 2021 21:58:46 +0000 Original-Received: from localhost ([127.0.0.1]:37449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3nPB-0000Bi-4p for submit@debbugs.gnu.org; Sun, 24 Jan 2021 16:58:46 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:39138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3nP9-0000BU-74 for 43265@debbugs.gnu.org; Sun, 24 Jan 2021 16:58:43 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10OLsSC9111728; Sun, 24 Jan 2021 21:58:37 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=v1rw/1Vc6TSXxk048Wp9lFUPHipOE67e9wtuClgv9B0=; b=u06+SnCPjE0zEuiEN1OQDfm3JVYBJ0C/quR5dUs+XlLR3fqcuVqQlBgMZZPMGHwUMVNN sUundblcn7mQo7qxP9wpg8o26MzQuqwAxxlt7PeMl4XXRBcXbWjo25pypr/TXsFcQ2PM Xul0hNg0jDAhaDHwzDcs681khObXBcD7+GXt55XVttp+U+mxTAsY4eB1yUlSsnbijOHp u54BIlfHgfcOGmhoy1s0CJuyS8RXNmxTFl09/i+ppT2xhtRPIdU4P/7VholhVGwDGRcr gimn+zrWcwy4cydWOhKiPQLQgK5YJOp2OeIX0PbNN7VHHRWlM+2SCv8F1KVa4nEZzg7H fw== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 368brkb0g9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 24 Jan 2021 21:58:36 +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 10OLu72P113272; Sun, 24 Jan 2021 21:58:36 GMT Original-Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by userp3020.oracle.com with ESMTP id 368wjnyqd6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 24 Jan 2021 21:58:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BnyDN9VMsR46L5gphKmgblAR9sZC/l8Ovx4d3wOTwoQqYUQmxW27vO4PnynPjZ+T0laaM6dly/+Xf3rqpfsfyAUM3moG7MPIF/XG//38Dm0C55fyftigi9+9YHMmXiMzcG17ReCOWC8T2/4PaQtKFfPlq3vab0ar9sLy0hLTRMhY9ttS6Kz8gVW6gAu4sGrtyg/Vddj/ZBpavLyCpmh07jWbfF5zJJT35zPBCe/zo2yBlvVNkWpUcUm3Rp9qwAE9Mad7KBSpM/Ntvr7jpGs8iPZBO/OI30A3oPseENCOqOTijSii3YCtEbvUhp+R2qLmDrkC+GN6/gj3CEfLeRnDfA== 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=v1rw/1Vc6TSXxk048Wp9lFUPHipOE67e9wtuClgv9B0=; b=n/qAIbkpxUu80MAKSlZOGUgkvQ+aniRbj5yrHX77EsQzSypg1ggURljHei/8RbCCMNdZQ7Hdmd/jTNwacEiBp9HZs6riNJZ8BPTSHz7e3ZYPym2oSoCkcRvVx9/hvohujwDRuN8chKoXTRhKmrtI4yI2lBB0BYxD4Xu5rm0lgxhxoocBzOQAFK7qIEfczmWAS7rWccQnAy5VWXzQ1Zty262Usu6O872vcnhy2OtdEYvWfNCjJL4bQ/oSo4yQ71kDFq/0S1dWKMc4f2MCbeuzlzD0ApY4gvhs0vUqNEydN7Fw92SpUb5pkeuqwUcrvzcHTYEsMHgHfNmXW2iY6sPEGg== 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=v1rw/1Vc6TSXxk048Wp9lFUPHipOE67e9wtuClgv9B0=; b=jjusRX/EjjE1Ol2Pl5+aGKSVUIx2lo1OSpDkwbTL3wStTM0RZUhnjqw008LFwTLWYEwZxSff/ByBFdrZxvXxW5binHlKhrhtRy5slzu8GkJdvtUjJLjU3MiGl1VFBSWQOy6YPd8d4MA9SuDsj8Qm9W6M1zn7edxerdoscxmokkE= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SN6PR10MB2734.namprd10.prod.outlook.com (2603:10b6:805:41::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.13; Sun, 24 Jan 2021 21:58:34 +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 21:58:34 +0000 Thread-Topic: [External] : bug#43265: 28.0.50; Inconsistent fontifying in elisp-mode Thread-Index: AQHW8o4+BLGwZHOHckOPuzIn7rFpUKo3Q54w In-Reply-To: <87y2gioztq.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: 83405c8d-7afb-4827-2929-08d8c0b331e7 x-ms-traffictypediagnostic: SN6PR10MB2734: 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: nmuREZrzYyUtTn/VjHiPGhKvrPkigfEESZkrGNl6ZTpF7k3oKF1Yc5pZTZaiqmX5V8jKaayjIwpCi1hSoG4e16nFF8aNvrqzhJyUfpC6002YWjtl0QOLBV0ZrB1F1z5+0AmtDzI9ac0ut5yTNjcY5kc7Xr0fButDhOLbDoZSW56daejK6Z7SJEUI0Xk7HQyv5w2+InnyC/wKswIwBiZ/HH0+W+en636KF1z/mx/rAvQd4ibjfYEGrNjFL4pKiHXYFWLP5hl5cuLemcTHH91bY9gZwQHpdYx3fjtt3U/6EfbOx6zu68fi2GAtYhP8GhPkNnH7FCGTsTQyz7Sy77J7U1I6Fbu7i+3LagozCyWgtBCtVdLTvj5DXAwTtYyyXb71eyRqXvSGm56OuvIznjnl6A== 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:(376002)(346002)(366004)(136003)(39860400002)(396003)(76116006)(8676002)(33656002)(55016002)(9686003)(186003)(316002)(66446008)(44832011)(64756008)(66556008)(66476007)(8936002)(66946007)(26005)(5660300002)(71200400001)(6506007)(52536014)(54906003)(4326008)(86362001)(83380400001)(110136005)(478600001)(2906002)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: zV90Tlg09S+aIuIbuLa7Nzwl6RSFl1LSNXpQOcn2uIMJtEiZD3ga8Aztd7nTgSY0JKkDasRv+N7BBg+M9+z/t7i7Sdm4n3pVbsuwpXmvWdwWEVAoN6/vVTVS51q6M7gLZy1qMqTYrJYYR412vpztFgVSbvQ7f+YuGAbqbVLgDjECiSQVR1nHRz5rRCwYFB0PFxUo6cxvnv8soHc6xGW4z/inH0sfgtSPx+SYvMir5QFWo+R7kpN34/6Sss8wbJrUjE9S5eoheDT72jdFmazh/MNF0OVfkVc+hbjN+u+wYbf82sfrgtFKqKTMI87/6ZOgV57NofhHa4+mikS+sSjy98RnlwD3ehz1JvuxDRBjgygQXbPcY008CI7YbdlNZHKWuFqQm/kJ/WS5yY4PL9Hqd0UzTd95KDpQsFfrqLkfiv4VoygNjq4GrdYBuJ12LJEal3lMfR1X/RZBHsL9eNjaPTR5qamUEF/QzLsltUAYBoJZvjIIUHjqCGsm/aK0IXB+zArEruegY54C5huwdYYYUj/5jWY8T2cl7snV7ifGei5/xeeYdGrCH0slMS2zZn5K69Trt/VILzJ+gWqo574h+O7mQg9Tu2QKTP7DFcCY4i81uHNeQ3dypDxx1Ajca3ygyWL1H+qLM9j7ZQNPTgyPx5FlAmHtsJBVGMrUM4vWiPnXTWCuB95isRBgb0F5rx0tI6YSzNy/y5its16s2CyxUVFaTcVxVnkf6EMQ2CoFAeUl/h2ZttHqGw2H9nm2 zHmPPt3L1dMC3hasHQdsXn9FE/4sqaSHwHCY8edVl6sBsRn52q6C/AxnMcHKuLg7uUJQHTQKaqdFFTs7mKCZWk4n2XAQ19zkH3 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: 83405c8d-7afb-4827-2929-08d8c0b331e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2021 21:58:34.1070 (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: vquQMGRjSvM66PcOPIpTAXGVu3K9XKcy243yBNlAhskK3v3bCWHlH6XPTaUx9Bv9htRKLYtRXnJuZ4glJN+peQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2734 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9874 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=854 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101240138 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9874 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 impostorscore=0 phishscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 spamscore=0 mlxscore=0 suspectscore=0 malwarescore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101240138 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198535 Archived-At: Oh boy - font-lock bikeshedding! > Skimming that thread, I can't see any explanation for why we don't check > that special forms are in a function position, while we do that for > macros? I.e., >=20 > (setq a '(if a b)) is currently fontified incorrectly, while > (setq a '(when a b)) is fontified correctly. Really? Are you sure one is correct and the other not, and that you have it the right way round?=20 (setq a '(setq b d)) (setq a '(if a b)) (setq a '(when a b)) (setq a '(and a b)) Nowadays, all of those `setq's, the `if', and the `and' are highlighted; poor-boy `when' isn't. :-( ___ But is it really "correct" to fontify _any_ of the names in those quoted sexps as if they were being used with their active meanings - as code? In that context they're just data - list elements. It was Emacs 25 that started highlighting all of those `setq's, and `and'. Up through Emacs 24, `setq' and `and' weren't highlighted anywhere - and both `if' and `when' were highlighted (everywhere). Emacs 25 made `when' a special case (unhighlighted), and it made `setq' and `and' unspecial (highlighted). That new behavior is no more "correct" than what it replaced. If any highlightings could be considered more correct than others, I'd think a more correct one would _at least_ not highlight function/macro/special-form names when used as elements of a list (i.e. quoted) or as plain-quoted atoms. Consider: (defun foo (x y) 42) ; or (defmacro foo (x y) 42) (setq a '(foo a b)) (setq a '(if a b)) `foo' in the quoted list isn't highlighted; `if' is. Why? In sum: 1. We're not very consistent (before or since Emacs 25). 2. The behavior's changed over time: sometimes to add highlighting (`setq', `and'), sometimes to remove it (`when'). Why? Maybe (or maybe not) there were some good reasons. In any case, for a _user_ things are not so clear. 3. IMO, it could make sense to not highlight such names when they're not syntactically seen as being _used_ as function/macro/special-form, but are instead seen as data (e.g. quoted). (When the use isn't obvious, pick a direction to err on, and be relatively consistent about it.) Now the question becomes, What constitutes "use" as a function/macro/special-form? Plain-quoting doesn't, IMO; but what about #'? How many angels fit on the head of a pin? (Depends on the angels and the pin.)