GNU bug report logs - #78167
[PATCH] 31.0.50; bash-ts-mode does not fontify varibles used consistently

Previous Next

Package: emacs;

Reported by: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>

Date: Wed, 30 Apr 2025 20:46:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

To reply to this bug, email your comments to 78167 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#78167; Package emacs. (Wed, 30 Apr 2025 20:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 30 Apr 2025 20:46:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] 31.0.50; bash-ts-mode does not fontify varibles used
 consistently
Date: Wed, 30 Apr 2025 22:43:59 +0200
[Message part 1 (text/plain, inline)]
Hey everyone.

When writing bash-scripts one often refers to variables in lots of different syntax variants, like the ones below:

    echo "${var}"
    echo "$var"
    echo ${var}
    echo $var

Using bash-ts-mode in Emacs these are all presented inconsistently:

* as string
* as variable-declaration
* as variable-use

This is due to missing or incorrectly configured selectors in sh-script.el.

Attached is a patch which makes them consistely fontified as font-lock-variable-use-face and use font-lock-bracket-face for the enclosing brackets.

Cheers!

—
Kind Regards
Jostein Kjønigsen


[Message part 2 (text/html, inline)]
[0001-sh-script.el-Improve-consistency-in-variable-use-fon.patch (application/octet-stream, attachment)]
[Message part 4 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 10 May 2025 10:24:01 GMT) Full text and rfc822 format available.

Notification sent to Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>:
bug acknowledged by developer. (Sat, 10 May 2025 10:24:02 GMT) Full text and rfc822 format available.

Message #10 received at 78167-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
Cc: 78167-done <at> debbugs.gnu.org
Subject: Re: bug#78167: [PATCH] 31.0.50;
 bash-ts-mode does not fontify varibles used consistently
Date: Sat, 10 May 2025 13:23:21 +0300
> From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
> Date: Wed, 30 Apr 2025 22:43:59 +0200
> 
> Hey everyone.
> 
> When writing bash-scripts one often refers to variables in lots of different syntax variants, like the ones below:
> 
>     echo "${var}"
>     echo "$var"
>     echo ${var}
>     echo $var
> 
> Using bash-ts-mode in Emacs these are all presented inconsistently:
> 
> * as string
> * as variable-declaration
> * as variable-use
> 
> This is due to missing or incorrectly configured selectors in sh-script.el.
> 
> Attached is a patch which makes them consistely fontified as font-lock-variable-use-face and use font-lock-bracket-face for the enclosing brackets.

Thanks, installed on the master branch, and closing the bug.




This bug report was last modified 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.