From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.devel Subject: Re: emacs-29 fbaf113bf38: rust-ts-mode: appropriately fontify doc strings Date: Mon, 04 Dec 2023 14:27:59 +0100 Message-ID: References: <170147491995.22987.13141633400020290013@vcs2.savannah.gnu.org> <20231201235520.4AE7EC40272@vcs2.savannah.gnu.org> 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="23628"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Christophe Troestler , Dmitry Gutov To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 04 14:28:32 2023 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 1rA8zw-0005vA-Ms for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Dec 2023 14:28:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rA8zY-0007wi-GV; Mon, 04 Dec 2023 08:28:08 -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 1rA8zU-0007wN-WC for emacs-devel@gnu.org; Mon, 04 Dec 2023 08:28:05 -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 1rA8zT-0001nO-Pb; Mon, 04 Dec 2023 08:28:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=zmgUqhuNwoJprJ+aff0/yb+yfc8vmm9KBLjab6xo+Dk=; b=pvXg2hFSyKbccgiriJfA TMiPnxs79qowXwo8dkHFJHhc72njzkkAsq5D61qUC2Jsv4213YeathiO/X8U8FINS7hlQmf+6EWLc KLdAuLx6sr1XupekLMb1Pi0SWTdc89hx4up6UJRM53qZ7VmjartgzfhtabcQUt6gfx0x6lUc8oRy9 U9DxmPbG+YbHuAMa7H4Yb5w7uVypwzPiOz23HaPA31NP8eeplEjU2iAYmbsbI0ee+R+zoicqXO0LP UO4MCKyIpPIWV6mwGL8DXPswZ9VfDM3WGWCjCUYR429GIY1l/ZVbeGHlKsli37dFX9+rvSOU59wfK uizupqk4HySh/g==; In-Reply-To: <20231201235520.4AE7EC40272@vcs2.savannah.gnu.org> (Dmitry Gutov's message of "Fri, 1 Dec 2023 18:55:20 -0500 (EST)") 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:313522 Archived-At: Dmitry Gutov writes: > branch: emacs-29 > commit fbaf113bf38ee7db8416f0c0581d479c40b2d69c > Author: Christophe Troestler > Commit: Dmitry Gutov > > rust-ts-mode: appropriately fontify doc strings >=20=20=20=20=20 > * lisp/progmodes/rust-ts-mode.el > (rust-ts-mode--comment-docstring): New function. > (rust-ts-mode--font-lock-settings): Use it > (https://lists.gnu.org/archive/html/emacs-devel/2023-12/msg00019.html= ). > [...] > +(defun rust-ts-mode--comment-docstring (node override start end &rest _a= rgs) > + "Use the comment or documentation face appropriately for comments." > + (let* ((beg (treesit-node-start node)) > + (end (treesit-node-end node)) > + (face (save-excursion > + (goto-char beg) > + (if (looking-at "///") > + 'font-lock-doc-face > + 'font-lock-comment-face)))) > + (treesit-fontify-with-override beg end face override start end))) > + I think this change now produces: In rust-ts-mode--comment-docstring: progmodes/rust-ts-mode.el:296:61: Warning: Unused lexical argument =E2=80= =98end=E2=80=99 This is with Emacs from master (cf11fdfd8e) on macOS. Best, Arash