From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 09:23:17 2024 Received: (at submit) by debbugs.gnu.org; 7 Nov 2024 14:23:17 +0000 Received: from localhost ([127.0.0.1]:47629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t93Po-0001VX-L0 for submit@debbugs.gnu.org; Thu, 07 Nov 2024 09:23:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:47060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t93Pj-0001VN-Vj for submit@debbugs.gnu.org; Thu, 07 Nov 2024 09:23:14 -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 1t93Pi-0005CJ-BX for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 09:23:11 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t93Pe-0005rJ-VI for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2024 09:23:08 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4314fa33a35so8337205e9.1 for ; Thu, 07 Nov 2024 06:23:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730989385; x=1731594185; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=QVKQSsQ7TYlru4It1dxsio0zwPuQ0GCz8X9ccoJfVr0=; b=IjGr48Vj8+xB9kKXE1NofJG6DwtSdruP+1PUtGyr8i3mhe3qQs+sqf/efhegLqX8cj yANG5VICFZUofdn9DA/tT7qZe3biU/9vGwgAxCTJ0acjmH8sSzWql+RzctxWvPmbQyWX RNtjFZdkH4rE5SvhnW28octgIL2j1wbcdE2W2hkwMUMWJd3dLIOmJSa/y3+fHxxUtotz qtjbndsHFV5Sp+ALksuopm2HTQSrHyeXfRuX2xNqzxfrV3e6DpX06NTkdWcF9XjvgTnL XlquhjFWILfDxFCVbp7e7LrHsGrSq3HAP+Svky8g+kgPSmkVbP9QwQif6kXzof7SmQi5 z3OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730989385; x=1731594185; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QVKQSsQ7TYlru4It1dxsio0zwPuQ0GCz8X9ccoJfVr0=; b=maB8CHGylbeAqHG7/veTPO5xKEU0yJ0gDQTtPOnMrPN1GK1sfReTUcSBeJcC1TNq/3 pKi345ApPdYWhNOBFjLzjOTDSJEJbfKg5D+WMA9ELbBlI8oypLJzL4ZDSHOCnSM7YdLz zJsuv4yfJA5e5INXYTDIfkDRt4eoss4J1H7JyB+jgQAqgZwfmCwHgLpuGlgMpETFYCFI 2aPEc4cafMYIYgJQxeBmN9dZwWIch2Q38REX6yMNt/Vj6e2Q29Ty8jgCR4QvVCNGpMw2 Ux/DTSl3YnGzrH0wOMp4v2HXk2CVm/qsgi5FRUYmnJsbw7xUkoM6wVHaPRTDj3PQciDD mzcQ== X-Gm-Message-State: AOJu0YziuXakb1qGViZzYiRYSQV9PksRfOtjyPit3s2KD5EH4I7mmbuA nzonXBthMRAnYzM/rAQZCiUdr0L2zetpTb1E/RxXBybpFpyZVVICECEvVg== X-Google-Smtp-Source: AGHT+IEepre9kFP9LFNyHOhiFhllcUvFhra21YxbK4tmC0bnh7Bd7Bp3i4W8rW8Z4OWWDEmgkFpdAA== X-Received: by 2002:a05:600c:3485:b0:431:5871:6c5d with SMTP id 5b1f17b1804b1-432b5f93e7cmr1593055e9.3.1730989384936; Thu, 07 Nov 2024 06:23:04 -0800 (PST) Received: from 3-191.divsi.unimi.it (3-191.divsi.unimi.it. [159.149.3.191]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432b05673d0sm25739535e9.25.2024.11.07.06.23.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 06:23:04 -0800 (PST) From: Vincenzo Pupillo To: bug-gnu-emacs@gnu.org Subject: 30.0.92; php-ts-mode: Some fixes for indentation and syntax highlighting. Date: Thu, 07 Nov 2024 15:23:03 +0100 Message-ID: <9805172.eNJFYEL58v@3-191.divsi.unimi.it> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart21936829.4csPzL39Zc" Content-Transfer-Encoding: 7Bit Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=v.pupillo@gmail.com; helo=mail-wm1-x329.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) This is a multi-part message in MIME format. --nextPart21936829.4csPzL39Zc Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Hi, this patch fixes some issues with both indentation and syntax highlighting. Has been tested with both the latest and earlier versions of the grammar. Thank you. V. --nextPart21936829.4csPzL39Zc Content-Disposition: attachment; filename="0001-Improved-font-locking-and-indentation.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0001-Improved-font-locking-and-indentation.patch" >From 693e78567f481a9749ddf8db7a3e144245bac102 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Thu, 7 Nov 2024 12:55:50 +0100 Subject: [PATCH] Improved font-locking and indentation. * lisp/progmodes/php-ts-mode.el (php-ts-mode--language-source-alist): Updated to latest version of PHP grammar. (php-ts-mode--indent-styles): namespace_use_declaration is now correctly indented. (php-ts-mode--operators): Support of the "argument unpacking operator". (php-ts-mode--font-lock-settings): nullsafe_member_call_expression is now highlighted correctly. (php-ts-mode--comment-indent-new-line): Delete trailing whitespace before inserting newline (see bug#73900 for more information). --- lisp/progmodes/php-ts-mode.el | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/php-ts-mode.el b/lisp/progmodes/php-ts-mode.el index 14a487d3f7a..d8a3f60508b 100644 --- a/lisp/progmodes/php-ts-mode.el +++ b/lisp/progmodes/php-ts-mode.el @@ -84,7 +84,7 @@ ;;; Install treesitter language parsers (defvar php-ts-mode--language-source-alist - '((php . ("https://github.com/tree-sitter/tree-sitter-php" "v0.23.4" "php/src")) + '((php . ("https://github.com/tree-sitter/tree-sitter-php" "v0.23.5" "php/src")) (phpdoc . ("https://github.com/claytonrcarter/tree-sitter-phpdoc")) (html . ("https://github.com/tree-sitter/tree-sitter-html" "v0.23.0")) (javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.23.0")) @@ -640,6 +640,7 @@ php-ts-mode--indent-styles ((query "(class_interface_clause (qualified_name) @indent)") parent-bol php-ts-mode-indent-offset) ((parent-is "class_declaration") parent-bol 0) + ((parent-is "namespace_use_declaration") parent-bol php-ts-mode-indent-offset) ((parent-is "namespace_use_group") parent-bol php-ts-mode-indent-offset) ((parent-is "function_definition") parent-bol 0) ((parent-is "member_call_expression") first-sibling php-ts-mode-indent-offset) @@ -781,7 +782,7 @@ php-ts-mode--operators '("--" "**=" "*=" "/=" "%=" "+=" "-=" ".=" "<<=" ">>=" "&=" "^=" "|=" "??" "??=" "||" "&&" "|" "^" "&" "==" "!=" "<>" "===" "!==" "<" ">" "<=" ">=" "<=>" "<<" ">>" "+" "-" "." "*" "**" "/" "%" - "->" "?->") + "->" "?->" "...") "PHP operators for tree-sitter font-locking.") (defconst php-ts-mode--predefined-constant @@ -993,7 +994,7 @@ php-ts-mode--font-lock-settings (member_call_expression name: (_) @font-lock-function-call-face) (nullsafe_member_call_expression - name: (_) @font-lock-constant-face)) + name: (_) @font-lock-function-call-face)) :language 'php :feature 'argument @@ -1266,8 +1267,14 @@ php-ts-mode--comment-indent-new-line (line-end-position) t nil)) (let ((offset (- (match-beginning 0) (line-beginning-position))) - (comment-prefix (match-string 0))) - (if soft (insert-and-inherit ?\n) (newline 1)) + (comment-prefix (match-string 0)) + (insert-line-break + (lambda () + (delete-horizontal-space) + (if soft + (insert-and-inherit ?\n) + (newline 1))))) + (funcall insert-line-break) (delete-region (line-beginning-position) (point)) (insert (make-string offset ?\s) -- 2.47.0 --nextPart21936829.4csPzL39Zc-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 03:50:54 2024 Received: (at 74239-done) by debbugs.gnu.org; 14 Nov 2024 08:50:54 +0000 Received: from localhost ([127.0.0.1]:44956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBVYz-00024J-Vr for submit@debbugs.gnu.org; Thu, 14 Nov 2024 03:50:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBVYy-000242-1E for 74239-done@debbugs.gnu.org; Thu, 14 Nov 2024 03:50:52 -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 1tBVYs-00084S-7M; Thu, 14 Nov 2024 03:50:46 -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=m8Av7fts7cCMDVhVdlYnCaE3UbEHvNx6+yYbKJJivJQ=; b=HvSgD9+KAuhr 9tA4dRAs7WPbLngB8c5/H72HMnsXixauX7oC77zotowuEma9EmU5yR8BSZ5u4dauDn+YSLdetZXqE UxOZ/QkJbGIf/Nh4/IQhRANKhXOT8wnnmEvyARpmOB0V2r2+0TbISPPfKjnvCxNUvTipthMBxFLUq 8n5sWYVzUmC1Jh6b8qBlzqjNuLWHa+Rt1ON/uZT4EDddPQLpRZ+ImqaCagRpc50fd4rfTyWLtbrzI 7Z+hIIqp1LZiV1PUTpALdCieEh7PSijkmS3fmBAcp+zMpjomE36n3yFX01O8g1EDuGc6BvEF6rdu7 yIG0EwcaGnEl13jtwXhWUQ==; Date: Thu, 14 Nov 2024 10:50:09 +0200 Message-Id: <86wmh6jj26.fsf@gnu.org> From: Eli Zaretskii To: Vincenzo Pupillo In-Reply-To: <9805172.eNJFYEL58v@3-191.divsi.unimi.it> (message from Vincenzo Pupillo on Thu, 07 Nov 2024 15:23:03 +0100) Subject: Re: bug#74239: 30.0.92; php-ts-mode: Some fixes for indentation and syntax highlighting. References: <9805172.eNJFYEL58v@3-191.divsi.unimi.it> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74239-done Cc: 74239-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 (---) > From: Vincenzo Pupillo > Date: Thu, 07 Nov 2024 15:23:03 +0100 > > this patch fixes some issues with both indentation and syntax highlighting. > Has been tested with both the latest and earlier versions of the grammar. Thanks, installed on the emacs-30 branch, and closing the bug. From unknown Sat Jun 21 10:45:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 12 Dec 2024 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator