From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: scame Newsgroups: gmane.emacs.devel Subject: Could the current font-lock mechanism support font locking code in comments? Date: Tue, 30 Mar 2021 07:40:25 +0000 Message-ID: <-vuXfnLB83FOYoLI0Kery7gGaun-l6OFzywSWZ6LMyJTpDGk9ooLIKfJ4xSCkYwNTK9IHgDhtkdxPw7kXZkyaippVgp7CRR3aMz7dbos3og=@protonmail.com> Reply-To: scame Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40368"; mail-complaints-to="usenet@ciao.gmane.io" To: "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 30 09:41:19 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 1lR903-000AQE-2S for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Mar 2021 09:41:19 +0200 Original-Received: from localhost ([::1]:44862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lR902-0002ih-22 for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Mar 2021 03:41:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lR8zU-0002JH-EH for emacs-devel@gnu.org; Tue, 30 Mar 2021 03:40:45 -0400 Original-Received: from mail-40135.protonmail.ch ([185.70.40.135]:22714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lR8zP-0003Yp-4h for emacs-devel@gnu.org; Tue, 30 Mar 2021 03:40:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1617090033; bh=cRa8stY8k2hLyhWnk5F3CsizlAip7pXhAjBK1tXDvf8=; h=Date:To:From:Reply-To:Subject:From; b=TBfK3B0iI96pTeut5A0149VjaNxwdq86GnJKGcr/NHSsLlxxwHclZDBp4qhNxJjFZ R6SAWuIlt89s4JkTzU3tb3H6/P7Rnpuo23gTt3Mv+Wmc+B+p2Oz/0A3y8nl7bZgV7T J1VvwrI+tAPFqM1e0W1N/XeArdI+1vARU2qc9JW4= Received-SPF: pass client-ip=185.70.40.135; envelope-from=laszlomail@protonmail.com; helo=mail-40135.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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:267159 Archived-At: For example, if I have a file which have some commented code parts then they could be easier to read if they were also font locked maybe with dimmed versions of the regular font lock colors. Could it be done by reusing the current font locking implementation and re-running it on a commented code part? I mean something like layers, the comment is font locked first with comment syntax as usual and then if some option is set then font locking is run again on the comment contents like it's some individual file and it's fontified with dimmed colors, so it can be distinguished from regular code. Could current font lock support this somehow or there is no way that the same buffer part can be fontified two times by such competing rules?