From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: region-based face-remapping Date: Tue, 02 Jan 2024 15:00:19 +0200 Message-ID: <83y1d7zy8s.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2420"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: JD Smith Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 02 14:01:47 2024 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 1rKeOw-0000Qv-4v for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jan 2024 14:01:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKeNz-0002is-Uu; Tue, 02 Jan 2024 08:00:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKeNt-0002YT-7k for emacs-devel@gnu.org; Tue, 02 Jan 2024 08:00:45 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKeNs-0004MI-HS; Tue, 02 Jan 2024 08:00:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+3cVUzMmwdo6ZuXbDnYHLxAzRVz5kmMSDpLPhPhMoX4=; b=AA+05ogm/Oy0vIW82454 lauMh0NErOdZXL7nPRQiDMPzloH5ZIjjzG0BJUBT9L93MM9ILe1QnwXxk1Oh6k7YqIcn3Yd5u7wbi 68XH9TEoG3wmhhffZCW0DbO9EC9rvS/ZG5TAvM+EyyPXQoOedAgspaHTrMkAuRksnYnFtezD9A36J /7gagd2+Y3rPRot2W4GmPoX48/2qICUzH4Kr72RUZ4c6Q1PomuxH6/eqrJaYdKXwSRT/Ww6CrXYSm V02qx9+a3w3W1ChkZPhiVEwDq4SQRgV/ek1e08Lsm5lOkEoHbeMgaCy6t+F1rlShKIi0cTm8uAUgW O8LqnqxJmSCxNg==; In-Reply-To: (message from JD Smith on Mon, 1 Jan 2024 19:22:29 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314452 Archived-At: > From: JD Smith > Date: Mon, 1 Jan 2024 19:22:29 -0500 > > > Has there been any discussion of implementing region-based face remapping, perhaps by adding 'face-remap as a property to overlays? This would be very useful for modes in which local syntax highlighting depends on point, now broadly possible thanks to treesitter (think “brighten surrounding semantic unit” or similar). If you only want to change the appearance around point, you need a much smaller revolution than position-dependent faces, which are something much more general. E.g., position-dependent faces need to change all the face-related APIs to pass a position and a buffer arguments, whereas if it's only "around point", you need nothing like that because the position of point is always known in each buffer.