From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: emacs-29 fbaf113bf38: rust-ts-mode: appropriately fontify doc strings Date: Mon, 4 Dec 2023 15:42:18 +0200 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; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24713"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Christophe Troestler To: Arash Esbati , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 04 14:43:15 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 1rA9EA-0006Fe-9f for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Dec 2023 14:43:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rA9DS-0004PB-M1; Mon, 04 Dec 2023 08:42:30 -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 1rA9DO-0004P0-UL for emacs-devel@gnu.org; Mon, 04 Dec 2023 08:42:28 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rA9DN-0001cr-0E; Mon, 04 Dec 2023 08:42:26 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id EF9F85C01C2; Mon, 4 Dec 2023 08:42:21 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 04 Dec 2023 08:42:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701697341; x=1701783741; bh=42vbxdUVyupcge6EmE4/MRuSCgeeMk+jH/+ Wo7zjEYE=; b=Q2qVz1TdKc14LP6kDomPY2mayCZkNyd6bMDfiNK5DMM6csNEuUj bPTU5tYHBxlKp39PT/G6FFjSU8FTG7qZuv03CShxef52AEyHkX4A8dXyYzqutXnE bswqLTYfDzOcKkM0x1MaH6a4QrHS0QOaHxD/BJKJ7NVF6CtUwo3ps25Ezd9xyW2X RminTuN9MHt7Ci1/B8j68wmXiA+ljPT3T2cxp7oFa5u2YSaYuM56vR1HfrB7UTOV 5xYCa3vCWX3Y0/Ftz2hliCisLIO7TpN0Wk0O+aqGY7XSzlpUbJ7mltq8jydd2adF f1qP3GrpUaLoZ/YAGNnte+qSfwYUwDQvkCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701697341; x=1701783741; bh=42vbxdUVyupcge6EmE4/MRuSCgeeMk+jH/+ Wo7zjEYE=; b=M5jkki65SzIxoAtcBmuGCuq10LfNKlSqKxWi2C4YMiNtaFWcKgI tqcWtC6AaATZfYVPLpwTHVGYmvfrHq+ENGmH19KDMLrycKHH08Yqtqc8kq9EXBjB U3l7SldtNeU1DnMH+PvjqzkOntmKqSXOMZ5fsyVlG8ZS06ZmUpa4sDXAys+OVX/b IvQnKJxLVHeuHdIwJX7K4N2yFvcKlfT/1WlSRGfrnLwUjcHW0RoxbIQykn7wLeFI jnOEznMF5p5gmwK62ZLYaG9OB42DZivaeypdAgd2bxZiP6E60rfTC4XMyonIKngD sQL0crU1Ui3dkThODOneOpScbdr0PNMBixg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejiedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepvdetffektdfftdelledtgedtuddufffhvdeilefgfedujefhheeiueeugfeh geeunecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Dec 2023 08:42:20 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.25; envelope-from=dmitry@gutov.dev; helo=out1-smtp.messagingengine.com X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 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, NICE_REPLY_A=-4.096, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:313523 Archived-At: On 04/12/2023 15:27, Arash Esbati wrote: > Dmitry Gutov writes: > >> branch: emacs-29 >> commit fbaf113bf38ee7db8416f0c0581d479c40b2d69c >> Author: Christophe Troestler >> Commit: Dmitry Gutov >> >> rust-ts-mode: appropriately fontify doc strings >> >> * 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 _args) >> + "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 ‘end’ > > This is with Emacs from master (cf11fdfd8e) on macOS. Thanks, but this has been fixed 2 days ago (in a547b0e2e83).