From unknown Tue Jun 17 22:27:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67554: [PATCH] Improve font-lock in lua-ts-mode Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2023 00:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67554 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 67554@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170138919828765 (code B ref -1); Fri, 01 Dec 2023 00:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Dec 2023 00:06:38 +0000 Received: from localhost ([127.0.0.1]:54729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8r3G-0007Tt-3g for submit@debbugs.gnu.org; Thu, 30 Nov 2023 19:06:38 -0500 Received: from lists.gnu.org ([2001:470:142::17]:54458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8r3E-0007Te-1e for submit@debbugs.gnu.org; Thu, 30 Nov 2023 19:06:36 -0500 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 1r8r2z-0001YT-2S for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 19:06:21 -0500 Received: from out-181.mta1.migadu.com ([95.215.58.181]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8r2x-0008EV-2H for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 19:06:20 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1701389173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=7M86uIh3QQtvdloHA/1QFFaizhBuaVAWjQQemiqFS8U=; b=gmfiKhRYBrrROoKVjLQxAQe5u/OqccTXWdfhrRKxOzJPQGYJQOJgNWE2txM4YalG7jCq1l K8xfF0VZb2uu1zvTHhvz2CiKDFSbKQGHHYzs5HqAXuSCcujJy0u5Iu46DZYpYj4FfjeOU3 t1HLfBO6hmpy+j/rvagfpqNElaS6Zb4= From: john muhl Date: Thu, 30 Nov 2023 17:51:15 -0600 Message-ID: <87h6l2lrbj.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.181; envelope-from=jm@pub.pink; helo=out-181.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Tags: patch While testing out ert-font-lock I found some inconsistencies and missing highlights. This also moves properties to level 4 font-lock and adds font-lock-comment-delimiter-face. From unknown Tue Jun 17 22:27:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67554: Acknowledgement ([PATCH] Improve font-lock in lua-ts-mode) Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2023 00:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67554 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 67554@debbugs.gnu.org Received: via spool by 67554-submit@debbugs.gnu.org id=B67554.170139100031521 (code B ref 67554); Fri, 01 Dec 2023 00:37:01 +0000 Received: (at 67554) by debbugs.gnu.org; 1 Dec 2023 00:36:40 +0000 Received: from localhost ([127.0.0.1]:54753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8rWJ-0008CL-E2 for submit@debbugs.gnu.org; Thu, 30 Nov 2023 19:36:40 -0500 Received: from out-179.mta1.migadu.com ([2001:41d0:203:375::b3]:52449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8rWH-0008CA-6r for 67554@debbugs.gnu.org; Thu, 30 Nov 2023 19:36:38 -0500 References: <87h6l2lrbj.fsf@pub.pink> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1701390986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3+jLP4WiJeNFfmZY0risOFoKm1u4X30c+Zvj7Rzwf5A=; b=nhQPhd6EnI/QYVMppyyUwQyox54jLkhJrIrabN0uQtbTyvpUAKJQ8AOp+zLyL8vcCzQR52 fjKW++Y/uVFOoZygOHJX0RaYFlff1bpwgw60QVP9Ilz6xYY3dacsowyK4W3FPkTHsm3EiW wgiMjC1FmybUGyovCOsSiI3cuEWJG30= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: john muhl Date: Thu, 30 Nov 2023 18:34:59 -0600 In-reply-to: Message-ID: <877clylpx4.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Improve-font-locking-in-lua-ts-mode-bug-67554.patch X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From 5a87b7b231a384c7035e75105bc173fc05f38336 Mon Sep 17 00:00:00 2001 From: john muhl Date: Tue, 14 Nov 2023 16:25:43 -0600 Subject: [PATCH] Improve font-locking in lua-ts-mode (bug#67554) * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Move property highlighting to level 4. (lua-ts--keywords): Remove `true', `false' and `nil' from keywords. (lua-ts--font-lock-settings): Highlight assignments, functions and labels in more places. Distinguish comment delimiters. (lua-ts--comment-font-lock): New function. --- lisp/progmodes/lua-ts-mode.el | 151 ++++++++++++++++++---------------- 1 file changed, 79 insertions(+), 72 deletions(-) diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index a910d759c83..7dd05b2757f 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -133,135 +133,141 @@ lua-ts--builtins "Lua built-in functions for tree-sitter font-locking.") (defvar lua-ts--keywords - '("and" "do" "else" "elseif" "end" "for" "function" - "goto" "if" "in" "local" "not" "or" "repeat" - "return" "then" "until" "while") + '("and" "do" "else" "elseif" "end" "for" "function" "goto" "if" + "in" "local" "not" "or" "repeat" "return" "then" "until" "while") "Lua keywords for tree-sitter font-locking and navigation.") +(defun lua-ts--comment-font-lock (node override start end &rest _) + "Apply font lock to comment NODE within START and END. +Applies `font-lock-comment-delimiter-face' and +`font-lock-comment-face' See `treesit-fontify-with-override' for +values of OVERRIDE." + (let* ((node-start (treesit-node-start node)) + (node-end (treesit-node-end node)) + (node-text (treesit-node-text node t)) + (delimiter-end (+ 2 node-start))) + (when (and (>= node-start start) + (<= delimiter-end end) + (string-match "\\`--" node-text)) + (treesit-fontify-with-override node-start + delimiter-end + font-lock-comment-delimiter-face + override)) + (treesit-fontify-with-override (max delimiter-end start) + (min node-end end) + font-lock-comment-face + override))) + (defvar lua-ts--font-lock-settings (treesit-font-lock-rules - :language 'lua + :default-language 'lua :feature 'bracket '(["(" ")" "[" "]" "{" "}"] @font-lock-bracket-face) - :language 'lua :feature 'delimiter '(["," ";"] @font-lock-delimiter-face) - :language 'lua :feature 'constant - '((variable_list - attribute: (attribute (["<" ">"] (identifier)))) - @font-lock-constant-face - (goto_statement (identifier) @font-lock-constant-face) - (label_statement) @font-lock-constant-face) + '([(variable_list + attribute: (attribute (["<" ">"] (identifier)))) + (label_statement) + (true) (false) (nil)] + @font-lock-constant-face) - :language 'lua :feature 'operator - '(["and" "not" "or" "+" "-" "*" "/" "%" "^" - "#" "==" "~=" "<=" ">=" "<" ">" "=" "&" - "~" "|" "<<" ">>" "//" ".."] - @font-lock-operator-face - (vararg_expression) @font-lock-operator-face) + '(["+" "-" "*" "/" "%" "^" "#" "==" "~=" "<=" ">=" + "<" ">" "=" "&" "~" "|" "<<" ">>" "//" ".." + (vararg_expression)] + @font-lock-operator-face) - :language 'lua :feature 'builtin `(((identifier) @font-lock-builtin-face (:match ,(regexp-opt lua-ts--builtins 'symbols) @font-lock-builtin-face))) - :language 'lua :feature 'function '((function_call name: (identifier) @font-lock-function-call-face) (function_call - name: (method_index_expression - method: (identifier) @font-lock-function-call-face)) + (method_index_expression + method: (identifier) @font-lock-function-call-face)) (function_call - name: (dot_index_expression (identifier) @font-lock-function-call-face))) + (dot_index_expression + field: (identifier) @font-lock-function-call-face))) - :language 'lua :feature 'punctuation '(["." ":"] @font-lock-punctuation-face) - :language 'lua :feature 'variable '((function_call - arguments: (arguments (identifier)) - @font-lock-variable-use-face) + (arguments (identifier) @font-lock-variable-use-face)) (function_call - name: (method_index_expression - table: (identifier) @font-lock-variable-use-face))) + (arguments + (binary_expression (identifier) @font-lock-variable-use-face))) + (function_call + (arguments + (bracket_index_expression (identifier) @font-lock-variable-use-face))) + (function_declaration + (parameters name: (identifier) @font-lock-variable-name-face))) - :language 'lua :feature 'number '((number) @font-lock-number-face) - :language 'lua :feature 'keyword - `((break_statement) @font-lock-keyword-face - (true) @font-lock-constant-face - (false) @font-lock-constant-face - (nil) @font-lock-constant-face - ,(vconcat lua-ts--keywords) - @font-lock-keyword-face) - - :language 'lua + `([(break_statement) + ,(vconcat lua-ts--keywords)] + @font-lock-keyword-face + (goto_statement ((identifier) @font-lock-constant-face))) + :feature 'string '((string) @font-lock-string-face) - :language 'lua :feature 'escape :override t '((escape_sequence) @font-lock-escape-face) - :language 'lua :feature 'comment - '((comment) @font-lock-comment-face + '((comment) @lua-ts--comment-font-lock (hash_bang_line) @font-lock-comment-face) - :language 'lua :feature 'definition '((function_declaration - name: (identifier) @font-lock-function-name-face) - (assignment_statement - (variable_list name: [(identifier)]) @font-lock-function-name-face - (expression_list value: (function_definition))) - (table_constructor - (field - name: (identifier) @font-lock-function-name-face - value: (function_definition))) - (function_declaration - name: (dot_index_expression (identifier) @font-lock-function-name-face)) + (identifier) @font-lock-function-name-face) (function_declaration - name: (method_index_expression (identifier) @font-lock-function-name-face)) + (dot_index_expression + field: (identifier) @font-lock-function-name-face)) (function_declaration (method_index_expression + method: (identifier) @font-lock-function-name-face)) + (assignment_statement + (variable_list + (identifier) @font-lock-function-name-face) + (expression_list value: (function_definition))) + (field + name: (identifier) @font-lock-function-name-face + value: (function_definition)) + (assignment_statement + (variable_list (dot_index_expression - table: (identifier) @font-lock-function-name-face - field: (identifier) @font-lock-property-name-face - ))) - (parameters - name: (identifier) @font-lock-variable-name-face) + field: (identifier) @font-lock-function-name-face)) + (expression_list + value: + (function_definition)))) + + :feature 'assignment + '((variable_list (identifier) @font-lock-variable-name-face) + (variable_list + (bracket_index_expression + field: (identifier) @font-lock-variable-name-face)) + (variable_list + (dot_index_expression + field: (identifier) @font-lock-variable-name-face)) (for_numeric_clause name: (identifier) @font-lock-variable-name-face)) - :language 'lua :feature 'property '((field name: (identifier) @font-lock-property-name-face) (dot_index_expression field: (identifier) @font-lock-property-use-face)) - :language 'lua - :feature 'assignment - '((variable_list - [(identifier) - (bracket_index_expression)] - @font-lock-variable-name-face) - (variable_list - (dot_index_expression - table: (identifier)) - @font-lock-variable-name-face)) - - :language 'lua :feature 'error :override t '((ERROR) @font-lock-warning-face)) @@ -665,13 +671,14 @@ lua-ts-mode (setq-local treesit-font-lock-settings lua-ts--font-lock-settings) (setq-local treesit-font-lock-feature-list '((comment definition) - (keyword property string) + (keyword string) (assignment builtin constant number) (bracket delimiter escape function operator + property punctuation variable))) -- 2.41.0 From unknown Tue Jun 17 22:27:42 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: john muhl Subject: bug#67554: closed (Re: bug#67554: Acknowledgement ([PATCH] Improve font-lock in lua-ts-mode)) Message-ID: References: <83a5qs90gf.fsf@gnu.org> <87h6l2lrbj.fsf@pub.pink> X-Gnu-PR-Message: they-closed 67554 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 67554@debbugs.gnu.org Date: Sat, 02 Dec 2023 13:52:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1701525122-30331-1" This is a multi-part message in MIME format... ------------=_1701525122-30331-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #67554: [PATCH] Improve font-lock in lua-ts-mode which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 67554@debbugs.gnu.org. --=20 67554: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67554 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1701525122-30331-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67554-done) by debbugs.gnu.org; 2 Dec 2023 13:52:01 +0000 Received: from localhost ([127.0.0.1]:56918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9QPZ-0007ss-B5 for submit@debbugs.gnu.org; Sat, 02 Dec 2023 08:52:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9QPX-0007sc-DJ for 67554-done@debbugs.gnu.org; Sat, 02 Dec 2023 08:52:00 -0500 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 1r9QPI-0008Va-Ij; Sat, 02 Dec 2023 08:51:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nEPyG+LO/Vqo1k+rFI86SOc4GKRkL6PSVpE+Drrh3vw=; b=eDRhvQUCvyUj n61MoMkq5stAyens6cOQRzipVssAaC4ZFTLbdK6Pf6ScVoBDM19ck0ZjPVtpNAKfeVNQ0UTDjkVjY YCAIMnUKyN5uTW5OBXVneqRbCaXPTTHSm+RpZjZbPLrim/OybyfSXaRDUhyFwmeQqp8MQOdvmaCiC aYRLRyUgg4IWmDJY+1kwzIhXnVZqfTCBvn/OEGr6TdkW1LOa/taZ5TV/a6A9JbQB3LKRnuHUFpxm7 9RnHGrRTMirAxZOKMNVBut1SbvZi26wmDDjd/b46Sa9GSwgmqqK2pwaTOXmEB90AXTnOC6LpohNAJ dUoIikZYuUx8C/dwrYIBzA==; Date: Sat, 02 Dec 2023 15:51:44 +0200 Message-Id: <83a5qs90gf.fsf@gnu.org> From: Eli Zaretskii To: john muhl In-Reply-To: <877clylpx4.fsf@pub.pink> (bug-gnu-emacs@gnu.org) Subject: Re: bug#67554: Acknowledgement ([PATCH] Improve font-lock in lua-ts-mode) References: <87h6l2lrbj.fsf@pub.pink> <877clylpx4.fsf@pub.pink> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67554-done Cc: 67554-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 30 Nov 2023 18:34:59 -0600 > From: john muhl via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > >From 5a87b7b231a384c7035e75105bc173fc05f38336 Mon Sep 17 00:00:00 2001 > From: john muhl > Date: Tue, 14 Nov 2023 16:25:43 -0600 > Subject: [PATCH] Improve font-locking in lua-ts-mode (bug#67554) > > * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Move property > highlighting to level 4. > (lua-ts--keywords): Remove `true', `false' and `nil' from > keywords. > (lua-ts--font-lock-settings): Highlight assignments, functions > and labels in more places. Distinguish comment delimiters. > (lua-ts--comment-font-lock): New function. Thanks, pushed to the master branch (with a couple of minor adjustments), and closing the bug. ------------=_1701525122-30331-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 1 Dec 2023 00:06:38 +0000 Received: from localhost ([127.0.0.1]:54729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8r3G-0007Tt-3g for submit@debbugs.gnu.org; Thu, 30 Nov 2023 19:06:38 -0500 Received: from lists.gnu.org ([2001:470:142::17]:54458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8r3E-0007Te-1e for submit@debbugs.gnu.org; Thu, 30 Nov 2023 19:06:36 -0500 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 1r8r2z-0001YT-2S for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 19:06:21 -0500 Received: from out-181.mta1.migadu.com ([95.215.58.181]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8r2x-0008EV-2H for bug-gnu-emacs@gnu.org; Thu, 30 Nov 2023 19:06:20 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1701389173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=7M86uIh3QQtvdloHA/1QFFaizhBuaVAWjQQemiqFS8U=; b=gmfiKhRYBrrROoKVjLQxAQe5u/OqccTXWdfhrRKxOzJPQGYJQOJgNWE2txM4YalG7jCq1l K8xfF0VZb2uu1zvTHhvz2CiKDFSbKQGHHYzs5HqAXuSCcujJy0u5Iu46DZYpYj4FfjeOU3 t1HLfBO6hmpy+j/rvagfpqNElaS6Zb4= From: john muhl To: bug-gnu-emacs@gnu.org Subject: [PATCH] Improve font-lock in lua-ts-mode Date: Thu, 30 Nov 2023 17:51:15 -0600 Message-ID: <87h6l2lrbj.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.181; envelope-from=jm@pub.pink; helo=out-181.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Tags: patch While testing out ert-font-lock I found some inconsistencies and missing highlights. This also moves properties to level 4 font-lock and adds font-lock-comment-delimiter-face. ------------=_1701525122-30331-1-- From unknown Tue Jun 17 22:27:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67554: Acknowledgement ([PATCH] Improve font-lock in lua-ts-mode) Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Dec 2023 14:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67554 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 67554@debbugs.gnu.org Received: via spool by 67554-submit@debbugs.gnu.org id=B67554.170152643432472 (code B ref 67554); Sat, 02 Dec 2023 14:14:01 +0000 Received: (at 67554) by debbugs.gnu.org; 2 Dec 2023 14:13:54 +0000 Received: from localhost ([127.0.0.1]:56955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9Qkk-0008Rg-Fb for submit@debbugs.gnu.org; Sat, 02 Dec 2023 09:13:54 -0500 Received: from out-189.mta1.migadu.com ([95.215.58.189]:58596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9Qki-0008RV-44 for 67554@debbugs.gnu.org; Sat, 02 Dec 2023 09:13:53 -0500 References: <87h6l2lrbj.fsf@pub.pink> <877clylpx4.fsf@pub.pink> <83a5qs90gf.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1701526421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1nDX+wwHeawkMSOtCyBZBXFIBvWHaBAbGg11WlWh208=; b=pI01v+Ns6FunYsVjBB7cegbDEhs96shl0eTCZEYAMuqb6B+08ftD5DrImydldtQA63/v4L 9NZ8mKVCNTYw22cquqfmocWorvFpOBO6pufvV3ezmtT8vex7AWT9/56Cxk7e0RPqjh01p7 SApwXx5OcXcuQ7lDwqFTHZZYMt/KPGs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: john muhl Date: Sat, 02 Dec 2023 08:08:16 -0600 In-reply-to: <83a5qs90gf.fsf@gnu.org> Message-ID: <87il5gheun.fsf@pub.pink> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Date: Thu, 30 Nov 2023 18:34:59 -0600 >> From: john muhl via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> >> >From 5a87b7b231a384c7035e75105bc173fc05f38336 Mon Sep 17 00:00:00 2001 >> From: john muhl >> Date: Tue, 14 Nov 2023 16:25:43 -0600 >> Subject: [PATCH] Improve font-locking in lua-ts-mode (bug#67554) >> >> * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Move property >> highlighting to level 4. >> (lua-ts--keywords): Remove `true', `false' and `nil' from >> keywords. >> (lua-ts--font-lock-settings): Highlight assignments, functions >> and labels in more places. Distinguish comment delimiters. >> (lua-ts--comment-font-lock): New function. > > Thanks, pushed to the master branch (with a couple of minor > adjustments), and closing the bug. Thanks for the help. The missing period in the doc string was inherited from ruby-ts-mode if you wanted to fix the same thing there (line 200). Or I could send a patch if that is somehow less work for you. From unknown Tue Jun 17 22:27:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67554: Acknowledgement ([PATCH] Improve font-lock in lua-ts-mode) Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Dec 2023 14:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67554 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: john muhl Cc: 67554@debbugs.gnu.org Received: via spool by 67554-submit@debbugs.gnu.org id=B67554.170152868213763 (code B ref 67554); Sat, 02 Dec 2023 14:52:02 +0000 Received: (at 67554) by debbugs.gnu.org; 2 Dec 2023 14:51:22 +0000 Received: from localhost ([127.0.0.1]:56988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9RL0-0003Zv-HR for submit@debbugs.gnu.org; Sat, 02 Dec 2023 09:51:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9RKy-0003Zi-Cw for 67554@debbugs.gnu.org; Sat, 02 Dec 2023 09:51:21 -0500 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 1r9RKj-00010a-DR; Sat, 02 Dec 2023 09:51:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=igQG2dbR64S6eUhJssrMfpWDe1/l8LoqEdNZx2ewU3E=; b=dzC8pcAz8y+E AjV0SpEZyI2qAN8O8C9/Lt6QM3JGo+eSQAKIg1fPU5uLW15CgiJnNUWYGZ7rbn64RLJNKVlAOewgS sJALC3/3SjTrE4bFZwt95usoHaEyKM0ouyIon68C66SW0Cxuw7QqopVbLCYv12k/vFIDFyHvRdq0F kscOFvnaHqf0Q/hD87dVcSb7XMevPXNDYMXnPoalUSYla4c8E71fb1fDcqxni7nR0cPZrfwbJSSk9 6/ZM6CkfpjpQqiq40ePE8KVULh1WH5Jqv8xgvHEzUqd1uXj9LsO0kPuHTamK7PPgq4izTPC5FYfP+ eF+n2wxepfQ51NPlq1PR9g==; Date: Sat, 02 Dec 2023 16:51:02 +0200 Message-Id: <834jh08xpl.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87il5gheun.fsf@pub.pink> (message from john muhl on Sat, 02 Dec 2023 08:08:16 -0600) References: <87h6l2lrbj.fsf@pub.pink> <877clylpx4.fsf@pub.pink> <83a5qs90gf.fsf@gnu.org> <87il5gheun.fsf@pub.pink> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: john muhl > Cc: 67554@debbugs.gnu.org > Date: Sat, 02 Dec 2023 08:08:16 -0600 > > Eli Zaretskii writes: > > > Thanks, pushed to the master branch (with a couple of minor > > adjustments), and closing the bug. > > Thanks for the help. The missing period in the doc string was > inherited from ruby-ts-mode if you wanted to fix the same thing > there (line 200). Or I could send a patch if that is somehow > less work for you. Fixed, thanks.