Subject: 28.0.50; [PATCH] Remove hardcoded underline for perl-mode variables

From: Protesilaos Stavrou <[email-masked]>
Date: Wed, 13 Jan 2021 15:46:23 +0200

Dear maintainers,

I have noticed that perl-mode modifies in a non-standard way the
font-lock-variable-name-face.  This makes it impossible to get perl
buffers to look like other programming modes, in accordance with user or
theme configurations.

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.

All the best,
Protesilaos

-- 
Protesilaos Stavrou
protesilaos.com
>From 69c6c946f24520edf34ea474290054c3ceb0cc0a Mon Sep 17 00:00:00 2001
From: Protesilaos Stavrou <[email-masked]>
Date: Wed, 13 Jan 2021 14:53:18 +0200
Subject: [PATCH] Remove hardcoded underline for perl-mode variables

* lisp/progmodes/perl-mode.el (perl-font-lock-keywords-2): Just assign
'font-lock-variable-name-face' without editing it further.

This respects user or theme configurations with regard to font-lock
faces.
---
 lisp/progmodes/perl-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index fd8a51b5a5..15b6cb0c7e 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -191,7 +191,7 @@ perl-font-lock-keywords-2
      ;;'("[$@%*][#{]?\\(\\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))))
+      (2 font-lock-variable-name-face))
      ("<\\(\\sw+\\)>" 1 font-lock-constant-face)
      ;;
      ;; Fontify keywords with/and labels as we do in `c++-font-lock-keywords'.
-- 
2.30.0