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: Could the current font-lock mechanism support font locking code in comments? Date: Wed, 31 Mar 2021 04:36:46 +0000 Message-ID: References: <-vuXfnLB83FOYoLI0Kery7gGaun-l6OFzywSWZ6LMyJTpDGk9ooLIKfJ4xSCkYwNTK9IHgDhtkdxPw7kXZkyaippVgp7CRR3aMz7dbos3og=@protonmail.com> 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="4824"; mail-complaints-to="usenet@ciao.gmane.io" Cc: scame , "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 31 06:37:30 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 1lRSbh-000188-Lx for ged-emacs-devel@m.gmane-mx.org; Wed, 31 Mar 2021 06:37:29 +0200 Original-Received: from localhost ([::1]:54250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRSbg-0007oI-Lh for ged-emacs-devel@m.gmane-mx.org; Wed, 31 Mar 2021 00:37:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRSb7-0007Pl-UJ for emacs-devel@gnu.org; Wed, 31 Mar 2021 00:36:53 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:42088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRSb5-0001NW-MP for emacs-devel@gnu.org; Wed, 31 Mar 2021 00:36:53 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12V4YTZk100636; Wed, 31 Mar 2021 04:36:49 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=2hO487CHlLFkAzVxzEN+ooIeu5zGDfwXC1Ul0YdWeB8=; b=YKTwM0FdTOQpMtSygW/mpS/bCaqbfbPuMZPasE8LNPco/oHcxmSiI/u+GHQpFMHgABRt AZ0OdPe6kMKy2budwXRKZMWyuMjOwXn4+Mx9U+R8xdPpellWa3ZRLj5L6ykHc5vgN1CD lkl9ArdtM9nMUCAs8X/qpRDYOdlHuu/JJYrTnA+5DYKJBn9gMpIjLBF3yp3pWT97+Cne 9xiunjaruRQ1aLczmGG3CjcU73Zjxkb2Pl9nNrznHgVsMGz5h9F0Aoj4vxjEvXMJjZKX 7YbSBuVSW5661XBF96H8yE8tJBGB7thzq6rTAYWyzabpZh17app+J+Ii4v8ogRj8Ttj0 XA== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 37mab3gv1m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Mar 2021 04:36:49 +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 12V4ZcEq092379; Wed, 31 Mar 2021 04:36:48 GMT Original-Received: from nam04-bn3-obe.outbound.protection.outlook.com (mail-bn3nam04lp2058.outbound.protection.outlook.com [104.47.46.58]) by aserp3030.oracle.com with ESMTP id 37mabnw8xk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Mar 2021 04:36:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J2zKdlDP7SDhv/rGnFgbJhgjMIW551TV/y9NXPx3+cOd8TrcOChpZufv1UOwwitdD5BLQ2jiYEdU9Gn7gccYajCD94q5ybIp7/RcpvDQ4hTlBepCIbE2crT4AEWXhrwvSB+TXC2o4l0llFqYTdQn1TNGAzQycqyPpqU1DaWvDauBq+7H0DjBS5VLNeVHol84/Ox/vEkSbwuyU61XNibBDOh4h0f7ywINXr8cclkjzIA52bg3jTO6vjtwRwZj/MZH8H0LBY9okaYUcsBpj0aXw965xbqOMocZ2ggB90P5c/hU0HQChM+Vz3pAZOqrQe8k4tJ+TEX2E2LOXFYhKKQR4g== 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=2hO487CHlLFkAzVxzEN+ooIeu5zGDfwXC1Ul0YdWeB8=; b=alKWUC2zldcJeyl95S/487Nk+ZQyxz0h5RfRLbvIOK/VzEYTp0ikfSk1ynUcpGb/vpkVeTNMnfjBHXJ6VOIGweF4e4VZ1WqHGsueIGOuD8oEqxktugmo2kDLrTUofppDZwiHyvIQ2rUmG9XPzDJjjYmNyLxvrWTzgvN2lv6IevW/U7Du+NclcQHTizFycWr+2hqNTWy8wN9eT1hPdtinKUHGkg4PHGJ+XhvsrltzezL7qLNWEjrzKacPiQZotFG/wfbf5G2WW/ycuIy6BfJi6N8T5q2+Aers6LXbHOJo8Dcv5jFOv95DkCvRhnMF/26Vb8cz2O5m/pyh+Hq0uN+cog== 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=2hO487CHlLFkAzVxzEN+ooIeu5zGDfwXC1Ul0YdWeB8=; b=mptOzX0byn16whsqYazqKI+sirZXyffvzGj9m4r87fnswwoWZG9jBAH+1W5ATLFADtJFsX+2zRWAx9pB+s3ZwNNA7uip01+a1ucVkYR0WICOxDGjzlgsniZcDIK8rhrCPOVpZDnc3tvK3UM0A0WGkbEBQW5lM4hy0ls16X3jDQc= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SN6PR10MB3069.namprd10.prod.outlook.com (2603:10b6:805:cd::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24; Wed, 31 Mar 2021 04:36:46 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315%5]) with mapi id 15.20.3999.027; Wed, 31 Mar 2021 04:36:46 +0000 Thread-Topic: [External] : Re: Could the current font-lock mechanism support font locking code in comments? Thread-Index: AQHXJcr6UL68qpKOh0O8GoSXIKdUfaqdfJRw 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: 0d04fd2d-6577-4320-3b51-08d8f3fe978c x-ms-traffictypediagnostic: SN6PR10MB3069: 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: X5hAuaDF3xFn9pniGk+wIeliOssVTra0XubJObnW+FICvW19gMhgHPQfZcXDSPtxC0L7UexdnmN12GfMWr37y4yPWvgnLre1i6sbHT1PIk3dI50vWe7aLvjBQl9PcAilr2DS8/MpnQVI7sZ9vCLds1pw0LteiMtvgoWaTLVwD1dU1g0Nl094voEbMgvQpNfMnfjjZIMQ7sG0WbX+1Vr5FF4eCI6lNZ9hYgksCyjvOaFN8RViGGx4Saul1+XuZnP1JDAeUKYL+H4Qmf/pAO5oxV1RrCWiLLIz/iuaUQuwOyQ7jJ4LpP3/N4FytPRDyt/zCbx3gP59QgaUm76NG9I6alcUkO4Yi/GvRL/KulpbLx1swXJcj9ofI0OG1v7SsqfcjcaRo4XDkuOK4dI7pkPwKfC4tf4IjpPWx8VQvuPIv1Enq1gqY1lqmXwDa1zuTh8HJDFKy0BUQ6u1DyYH0SG1o9oAJzfPgqnFm0XkhSrAGiBmhNTrFwxiFSwW8+GCmw+sAYAQAuVQIgVdnwkDFPtMARQmfUdWifmfOId+Mrj7hisP6wV78FfJvsBUSCYifEi+vhkwvBrYFpX12tJtggPw8FNz6Jl7rS1/oOjIdIBIc5Slu6e1E/XWzmECW6NwarY4S29dHSJXt80VRLOjgqanJhZY5khVqFKx19pKJDE+Ay8= 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:(136003)(396003)(376002)(366004)(39860400002)(346002)(2906002)(296002)(55016002)(9686003)(38100700001)(316002)(33656002)(52536014)(86362001)(66556008)(64756008)(66476007)(66946007)(66446008)(4326008)(44832011)(5660300002)(71200400001)(478600001)(186003)(7696005)(54906003)(6506007)(8676002)(26005)(76116006)(6916009)(8936002)(83380400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?9zfY8VHOxC4XBXem5Btt3Trg9TYqWuSZZjQjhoY4sLsxioPhU4OWc4W/OFwx?= =?us-ascii?Q?JoiezPiS6HrSzg3S3jreuQAmJ/VXJGCPDpe4WSqaB+DQhL3X7sAjiqFvKYOK?= =?us-ascii?Q?zO/fx/bkqHz6EhVrbxHKahWHmwSxtN1POfyJqU7W+fWg9FvMmFFmXfGrCgAq?= =?us-ascii?Q?7v2LaQyxbKrElcYwB3RzOJ/8GBMac0xj5yewKnx2ckykjV3MR9EsXKhhus3E?= =?us-ascii?Q?N08bZNYdEkMpLKY2fte8333MEno0hC8fpWLRq17Eqp5HB3iA+gLKZX8tue12?= =?us-ascii?Q?eMnu0ZbxCTH14TiQ39VvNZnfYR44YihxIG3kjcqKLWaDNXZImGb/EBj5XCJJ?= =?us-ascii?Q?TMNyAezRYZB0DscqrfNe0hUiGNldt1kWcgl1hrHHZf3Ax8YsP0DpUV/DtPbu?= =?us-ascii?Q?ioSAppsmlYqOOT9n9LwygJTXVGYfcE21H0Nw3D0N8K9BSzA039DboE8Z4T6G?= =?us-ascii?Q?k9Mh45KaIHmVJsD35mbUd9q7fChSuOHgJDmfRo+YtnsveUPibqdbXRYDXrPh?= =?us-ascii?Q?uNXnpCihjQrNJba8VpsZU2r1Ip8VnThzeyHw5vVRA9yjgZYg+6grSDuLU0fr?= =?us-ascii?Q?5mEKuMEWsuDQ8UDwLVlb8FfNyBn/64tgkO6vJRPALG9ZO4bgmfa8/2Uznh0f?= =?us-ascii?Q?upez 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: 0d04fd2d-6577-4320-3b51-08d8f3fe978c X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Mar 2021 04:36:46.1891 (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: Ot/uWE04PBaWynBL7YwU2nD27y2wEA2JSs4DTfNSlu9GYhJq0fQKUcuScbyWUYye6SUujRDUuyZHMbPFZ1b/nQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB3069 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9939 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 spamscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2103300000 definitions=main-2103310033 X-Proofpoint-ORIG-GUID: UVtW9Miw5pmDnnA-d11kkOMIGnAZdxFg X-Proofpoint-GUID: UVtW9Miw5pmDnnA-d11kkOMIGnAZdxFg X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9939 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 phishscore=0 malwarescore=0 suspectscore=0 clxscore=1015 impostorscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2103300000 definitions=main-2103310033 Received-SPF: pass client-ip=156.151.31.85; envelope-from=drew.adams@oracle.com; helo=userp2120.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, RCVD_IN_MSPIKE_H2=-0.001, 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:267203 Archived-At: > > Vanilla Emacs might not have dimming, but Emacs has it. > > Library `doremi-frm.el' provides commands that let > > you incrementally dim or strengthen a face or frame > > foreground or background. >=20 > What I meant is that there is no way to define a face that dims > other faces. Was that requested? > What you point to is what I was referring to as the hard way: you have > to come up with a list of faces used by the font-lock rules=20 You can do what I described in a blanket way to all faces. Or to any faces. And any faces can be used by font-lock (rules). > then pass it to a function (like the ones in > `doremi-frm`) which returns a new face > (since you can't modify the actual font-lock faces Why do you say that you can't change the actual font-lock faces? With what I described you do exactly that (to any faces, whether used for font-locking or not). Do you mean something different, by "modify the actual faces" from changing their attribute values (e.g. foreground and background colors)? > which are still being needed in their non-dimmed form) I don't follow you. Why is that? Was that part of the request - that the same face have two different appearances, and at the same time no less? I don't even know what that means. > and then arrange to run the existing rules in such > a way that they actually use your newly defined faces. In what I described face colors are changed; that's all. Font-locking still does what it does. It uses the same faces - they just change color; that's all. In what I described the colors change as you watch, i.e., as you change them incrementally. There's no change to anything in font-lock (rules, face names, whatever). > It's cumbersome and tricky to do it in a reliable way. I guess we're talking about completely different things. Perhaps I misunderstood the request. I thought it was just to dim some (or all) faces. That, you can do with what I described - dim, desaturate, the opposite, or whatever. > Instead, what we'd need is a face whose effect is to modify the > underlying face (e.g. by dimming it). I guess alpha-blending could be > used for that. Sorry, you've lost me. I don't know what the need is to have a face whose effect is to modify another, "underlying" face (dimming it). What's an "underlying" face - are you perhaps talking about face attribute inheritance? Anyway, it's not important that I follow you. What I described is, I hope, clear. If it doesn't correspond to the request, so be it. Sorry for the noise, in that case.