unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Vincenzo Pupillo <v.pupillo@gmail.com>
To: 73975@debbugs.gnu.org
Subject: bug#73975: 30.0.91; [PATCH] php-ts-mode: highlight namespace name in "use" clause.
Date: Wed, 23 Oct 2024 21:16:40 +0200	[thread overview]
Message-ID: <2708547.lGaqSPkdTl@fedora> (raw)

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

Ciao,
this small patch fix the highlighting of the namespace name in the “use” 
clause.
Has been tested with both the latest and earlier versions of the grammar.

Thank you.

Vincenzo

[-- Attachment #2: 0001-Highlight-namespace-name-in-use-clause.patch --]
[-- Type: text/x-patch, Size: 1049 bytes --]

From a3f8f437603c79a6f6ac5a93ddf6a2cbd58de86f Mon Sep 17 00:00:00 2001
From: Vincenzo Pupillo <v.pupillo@gmail.com>
Date: Wed, 23 Oct 2024 20:45:48 +0200
Subject: [PATCH] Highlight namespace name in "use" clause.

* lisp/progmodes/php-ts-mode.el (php-ts-mode--font-lock-settings):
New rule to highlight namespace name in "use" clause.
---
 lisp/progmodes/php-ts-mode.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/progmodes/php-ts-mode.el b/lisp/progmodes/php-ts-mode.el
index 1c5fdb6f617..ce8cf8aa340 100644
--- a/lisp/progmodes/php-ts-mode.el
+++ b/lisp/progmodes/php-ts-mode.el
@@ -967,6 +967,7 @@ php-ts-mode--font-lock-settings
      ,@(when (not (php-ts-mode--test-namespace-use-group-clause-p))
          '((namespace_use_group
             (namespace_use_clause (name) @font-lock-type-face))))
+     (namespace_use_clause (name) @font-lock-type-face)
      (namespace_name "\\" @font-lock-delimiter-face)
      (namespace_name (name) @font-lock-type-face)
      (use_declaration (name) @font-lock-property-use-face)
-- 
2.47.0


             reply	other threads:[~2024-10-23 19:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 19:16 Vincenzo Pupillo [this message]
2024-10-24 15:39 ` bug#73975: 30.0.91; [PATCH] php-ts-mode: highlight namespace name in "use" clause Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2708547.lGaqSPkdTl@fedora \
    --to=v.pupillo@gmail.com \
    --cc=73975@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).