unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Protesilaos Stavrou <info@protesilaos.com>
To: 45840@debbugs.gnu.org
Subject: bug#45840: 28.0.50; [PATCH] Remove hardcoded underline for perl-mode variables
Date: Wed, 13 Jan 2021 15:46:23 +0200	[thread overview]
Message-ID: <87sg757xw0.fsf@protesilaos.com> (raw)

[-- 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


             reply	other threads:[~2021-01-13 13:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 13:46 Protesilaos Stavrou [this message]
2021-01-19  6:32 ` bug#45840: 28.0.50; [PATCH] Remove hardcoded underline for perl-mode variables Lars Ingebrigtsen
2021-01-19  7:07   ` Protesilaos Stavrou
2021-01-19  7:11     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sg757xw0.fsf@protesilaos.com \
    --to=info@protesilaos.com \
    --cc=45840@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).