GNU bug report logs - #45840
28.0.50; [PATCH] Remove hardcoded underline for perl-mode variables

Previous Next

Package: emacs;

Reported by: Protesilaos Stavrou <info <at> protesilaos.com>

Date: Wed, 13 Jan 2021 13:47:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Protesilaos Stavrou <info <at> protesilaos.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 45840 <at> debbugs.gnu.org
Subject: bug#45840: 28.0.50; [PATCH] Remove hardcoded underline for perl-mode variables
Date: Tue, 19 Jan 2021 09:07:27 +0200
[Message part 1 (text/plain, inline)]
On 2021-01-19, 07:32 +0100, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Protesilaos Stavrou <info <at> protesilaos.com> writes:
>
>> The attached patch merely assigns font-lock-variable-name-face while
>> removing the hardcoded underline property.
>>
>> If you think that the underline should remain in place, then I can
>> provide another patch that would add a new face which would inherit from
>> font-lock-variable-name-face and add an underline accordingly.
>
> The comment here mentions this:
>
>      ;; Additionally underline non-scalar variables.  Maybe this is a bad idea.
>      ;;'("[$@%*][#{]?\\(\\sw+\\)" 1 font-lock-variable-name-face)
>      ("[$*]{?\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-variable-name-face)
>      ("\\([@%]\\|\\$#\\)\\(\\sw+\\(::\\sw+\\)*\\)"
>       (2 (cons font-lock-variable-name-face '(underline))))
>
> And it is a bad idea to hard-code this, but having different faces here
> makes sense, I think.  So could you whip up another patch to add the new
> face, as you suggested?

Thank you, Lars!  Please find attached the new patch.  I also added a
NEWS entry.  Feel free to edit it as you will.

-- 
Protesilaos Stavrou
protesilaos.com
[0001-Add-perl-non-scalar-variable-face-to-perl-mode.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 127 days ago.

Previous Next


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