* bug#75156: [PATCH] Please install these elixir-ts-mode fixes
@ 2024-12-28 6:49 Wilhelm Kirschbaum
2024-12-28 6:53 ` Wilhelm Kirschbaum
0 siblings, 1 reply; 5+ messages in thread
From: Wilhelm Kirschbaum @ 2024-12-28 6:49 UTC (permalink / raw)
To: 75156
[-- Attachment #1.1: Type: text/plain, Size: 232 bytes --]
Attached are two updates to elixir-ts-mode for minor improvements. Can
someone please install them if there are no concerns.
The patches are from the emacs-30 branch. I can rebase them on master if
required?
Kind regards,
Wilhelm
[-- Attachment #1.2: Type: text/html, Size: 337 bytes --]
[-- Attachment #2: 0002-Add-missing-fortification-matches-for-elixir-ts-mode.patch --]
[-- Type: text/x-patch, Size: 1674 bytes --]
From b6fc69cef33e5ad22f17febbc7fb34ec7dceccb9 Mon Sep 17 00:00:00 2001
From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
Date: Sun, 15 Sep 2024 09:46:35 +0200
Subject: [PATCH 2/2] Add missing fortification matches for elixir-ts-mode
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings):
Add matches for missing tokens and fix atom type face.
---
lisp/progmodes/elixir-ts-mode.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el
index 4e0caae93e3..41662822713 100644
--- a/lisp/progmodes/elixir-ts-mode.el
+++ b/lisp/progmodes/elixir-ts-mode.el
@@ -488,7 +488,8 @@ elixir-ts--font-lock-settings
:language 'elixir
:feature 'elixir-data-type
- '([(atom) (alias)] @font-lock-type-face
+ '((alias) @font-lock-type-face
+ (atom) @elixir-ts-atom
(keywords (pair key: (keyword) @elixir-ts-keyword-key))
[(keyword) (quoted_keyword)] @elixir-ts-atom
[(boolean) (nil)] @elixir-ts-atom
@@ -553,6 +554,10 @@ elixir-ts--font-lock-settings
(unary_operator operand: (identifier) @font-lock-variable-use-face)
(interpolation (identifier) @font-lock-variable-use-face)
(do_block (identifier) @font-lock-variable-use-face)
+ (rescue_block (identifier) @font-lock-variable-use-face)
+ (catch_block (identifier) @font-lock-variable-use-face)
+ (else_block (identifier) @font-lock-variable-use-face)
+ (after_block (identifier) @font-lock-variable-use-face)
(access_call target: (identifier) @font-lock-variable-use-face)
(access_call "[" key: (identifier) @font-lock-variable-use-face "]"))
--
2.45.2
[-- Attachment #3: 0001-Always-match-underscore-variables-for-elixir-ts-mode.patch --]
[-- Type: text/x-patch, Size: 1321 bytes --]
From 14f8fbbfa9322fa15a556f67715b11b6db4b56eb Mon Sep 17 00:00:00 2001
From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
Date: Sun, 15 Sep 2024 09:46:07 +0200
Subject: [PATCH 1/2] Always match underscore variables for elixir-ts-mode
The code comment is invalid, as it is common to treat any _variable as a
comment.
* lisp/progmodes/elixir-ts-mode.el (elixir-ts-font-lock-settings):
Add ":override t" to comment identifier match.
---
lisp/progmodes/elixir-ts-mode.el | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el
index cacdb266298..4e0caae93e3 100644
--- a/lisp/progmodes/elixir-ts-mode.el
+++ b/lisp/progmodes/elixir-ts-mode.el
@@ -402,11 +402,9 @@ elixir-ts--font-lock-settings
(binary_operator
left: (call target: (identifier) @font-lock-function-name-face))))))
- ;; A function definition like "def _foo" is valid, but we should
- ;; not apply the comment-face unless its a non-function identifier, so
- ;; the comment matches has to be after the function matches.
:language 'elixir
:feature 'elixir-comment
+ :override t
'((comment) @font-lock-comment-face
((identifier) @font-lock-comment-face
(:match "^_[a-z]\\|^_$" @font-lock-comment-face)))
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#75156: [PATCH] Please install these elixir-ts-mode fixes
2024-12-28 6:49 bug#75156: [PATCH] Please install these elixir-ts-mode fixes Wilhelm Kirschbaum
@ 2024-12-28 6:53 ` Wilhelm Kirschbaum
2024-12-28 8:44 ` Stefan Kangas
0 siblings, 1 reply; 5+ messages in thread
From: Wilhelm Kirschbaum @ 2024-12-28 6:53 UTC (permalink / raw)
To: 75156
[-- Attachment #1.1: Type: text/plain, Size: 467 bytes --]
On Sat, Dec 28, 2024 at 8:49 AM Wilhelm Kirschbaum <wkirschbaum@gmail.com>
wrote:
> Attached are two updates to elixir-ts-mode for minor improvements. Can
> someone please install them if there are no concerns.
>
> The patches are from the emacs-30 branch. I can rebase them on master if
> required?
>
> Kind regards,
> Wilhelm
>
I see there is a typo in the commit message, apologies.
fontication, not fortification.
Modified patch attached.
[-- Attachment #1.2: Type: text/html, Size: 893 bytes --]
[-- Attachment #2: 0002-Add-missing-fontification-matches-for-elixir-ts-mode.patch --]
[-- Type: text/x-patch, Size: 1674 bytes --]
From 6d31ee4f3dbba849fcaa8454e2aa4facd5a8fa02 Mon Sep 17 00:00:00 2001
From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
Date: Sun, 15 Sep 2024 09:46:35 +0200
Subject: [PATCH 2/2] Add missing fontification matches for elixir-ts-mode
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings):
Add matches for missing tokens and fix atom type face.
---
lisp/progmodes/elixir-ts-mode.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el
index 4e0caae93e3..41662822713 100644
--- a/lisp/progmodes/elixir-ts-mode.el
+++ b/lisp/progmodes/elixir-ts-mode.el
@@ -488,7 +488,8 @@ elixir-ts--font-lock-settings
:language 'elixir
:feature 'elixir-data-type
- '([(atom) (alias)] @font-lock-type-face
+ '((alias) @font-lock-type-face
+ (atom) @elixir-ts-atom
(keywords (pair key: (keyword) @elixir-ts-keyword-key))
[(keyword) (quoted_keyword)] @elixir-ts-atom
[(boolean) (nil)] @elixir-ts-atom
@@ -553,6 +554,10 @@ elixir-ts--font-lock-settings
(unary_operator operand: (identifier) @font-lock-variable-use-face)
(interpolation (identifier) @font-lock-variable-use-face)
(do_block (identifier) @font-lock-variable-use-face)
+ (rescue_block (identifier) @font-lock-variable-use-face)
+ (catch_block (identifier) @font-lock-variable-use-face)
+ (else_block (identifier) @font-lock-variable-use-face)
+ (after_block (identifier) @font-lock-variable-use-face)
(access_call target: (identifier) @font-lock-variable-use-face)
(access_call "[" key: (identifier) @font-lock-variable-use-face "]"))
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#75156: [PATCH] Please install these elixir-ts-mode fixes
2024-12-28 6:53 ` Wilhelm Kirschbaum
@ 2024-12-28 8:44 ` Stefan Kangas
2024-12-28 8:49 ` Wilhelm Kirschbaum
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2024-12-28 8:44 UTC (permalink / raw)
To: Wilhelm Kirschbaum, 75156-done
Version: 30.1
Wilhelm Kirschbaum <wkirschbaum@gmail.com> writes:
> On Sat, Dec 28, 2024 at 8:49 AM Wilhelm Kirschbaum <wkirschbaum@gmail.com>
> wrote:
>
>> Attached are two updates to elixir-ts-mode for minor improvements. Can
>> someone please install them if there are no concerns.
>>
>> The patches are from the emacs-30 branch. I can rebase them on master if
>> required?
>>
>> Kind regards,
>> Wilhelm
>>
>
> I see there is a typo in the commit message, apologies.
Thanks. Installed on emacs-30 as commit 624322d5f6a.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#75156: [PATCH] Please install these elixir-ts-mode fixes
2024-12-28 8:44 ` Stefan Kangas
@ 2024-12-28 8:49 ` Wilhelm Kirschbaum
2024-12-28 16:38 ` Stefan Kangas
0 siblings, 1 reply; 5+ messages in thread
From: Wilhelm Kirschbaum @ 2024-12-28 8:49 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 75156-done
[-- Attachment #1.1: Type: text/plain, Size: 840 bytes --]
On Sat, Dec 28, 2024 at 10:44 AM Stefan Kangas <stefankangas@gmail.com>
wrote:
> Version: 30.1
>
> Wilhelm Kirschbaum <wkirschbaum@gmail.com> writes:
>
> > On Sat, Dec 28, 2024 at 8:49 AM Wilhelm Kirschbaum <
> wkirschbaum@gmail.com>
> > wrote:
> >
> >> Attached are two updates to elixir-ts-mode for minor improvements. Can
> >> someone please install them if there are no concerns.
> >>
> >> The patches are from the emacs-30 branch. I can rebase them on master if
> >> required?
> >>
> >> Kind regards,
> >> Wilhelm
> >>
> >
> > I see there is a typo in the commit message, apologies.
>
> Thanks. Installed on emacs-30 as commit 624322d5f6a.
>
Thanks Stefan, much appreciated.
I added two patches to the original email. Do you mind installing the other
patch as well? I attached it for convenience.
[-- Attachment #1.2: Type: text/html, Size: 1431 bytes --]
[-- Attachment #2: 0001-Always-match-underscore-variables-for-elixir-ts-mode.patch --]
[-- Type: text/x-patch, Size: 1321 bytes --]
From 14f8fbbfa9322fa15a556f67715b11b6db4b56eb Mon Sep 17 00:00:00 2001
From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
Date: Sun, 15 Sep 2024 09:46:07 +0200
Subject: [PATCH 1/2] Always match underscore variables for elixir-ts-mode
The code comment is invalid, as it is common to treat any _variable as a
comment.
* lisp/progmodes/elixir-ts-mode.el (elixir-ts-font-lock-settings):
Add ":override t" to comment identifier match.
---
lisp/progmodes/elixir-ts-mode.el | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el
index cacdb266298..4e0caae93e3 100644
--- a/lisp/progmodes/elixir-ts-mode.el
+++ b/lisp/progmodes/elixir-ts-mode.el
@@ -402,11 +402,9 @@ elixir-ts--font-lock-settings
(binary_operator
left: (call target: (identifier) @font-lock-function-name-face))))))
- ;; A function definition like "def _foo" is valid, but we should
- ;; not apply the comment-face unless its a non-function identifier, so
- ;; the comment matches has to be after the function matches.
:language 'elixir
:feature 'elixir-comment
+ :override t
'((comment) @font-lock-comment-face
((identifier) @font-lock-comment-face
(:match "^_[a-z]\\|^_$" @font-lock-comment-face)))
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#75156: [PATCH] Please install these elixir-ts-mode fixes
2024-12-28 8:49 ` Wilhelm Kirschbaum
@ 2024-12-28 16:38 ` Stefan Kangas
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2024-12-28 16:38 UTC (permalink / raw)
To: Wilhelm Kirschbaum; +Cc: 75156-done
Wilhelm Kirschbaum <wkirschbaum@gmail.com> writes:
> I added two patches to the original email. Do you mind installing the other
> patch as well? I attached it for convenience.
Sorry, I must have missed that one. I've now installed that patch also
on emacs-30, as commit 43a8f0de5ec.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-28 16:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-28 6:49 bug#75156: [PATCH] Please install these elixir-ts-mode fixes Wilhelm Kirschbaum
2024-12-28 6:53 ` Wilhelm Kirschbaum
2024-12-28 8:44 ` Stefan Kangas
2024-12-28 8:49 ` Wilhelm Kirschbaum
2024-12-28 16:38 ` Stefan Kangas
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).