all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#45840: 28.0.50; [PATCH] Remove hardcoded underline for perl-mode variables
@ 2021-01-13 13:46 Protesilaos Stavrou
  2021-01-19  6:32 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Protesilaos Stavrou @ 2021-01-13 13:46 UTC (permalink / raw)
  To: 45840

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

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Remove-hardcoded-underline-for-perl-mode-variables.patch --]
[-- Type: text/x-patch, Size: 1187 bytes --]

From 69c6c946f24520edf34ea474290054c3ceb0cc0a Mon Sep 17 00:00:00 2001
From: Protesilaos Stavrou <info@protesilaos.com>
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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-19  7:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13 13:46 bug#45840: 28.0.50; [PATCH] Remove hardcoded underline for perl-mode variables Protesilaos Stavrou
2021-01-19  6:32 ` Lars Ingebrigtsen
2021-01-19  7:07   ` Protesilaos Stavrou
2021-01-19  7:11     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.