From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.bugs Subject: bug#45840: 28.0.50; [PATCH] Remove hardcoded underline for perl-mode variables Date: Wed, 13 Jan 2021 15:46:23 +0200 Message-ID: <87sg757xw0.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28555"; mail-complaints-to="usenet@ciao.gmane.io" To: 45840@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 13 14:51:40 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzgYm-0007KN-42 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Jan 2021 14:51:40 +0100 Original-Received: from localhost ([::1]:54212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzgYl-0006SP-3u for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Jan 2021 08:51:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzgUI-0003cL-2I for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2021 08:47:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzgUH-0003X5-Pd for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2021 08:47:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kzgUH-0001OY-Nd for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2021 08:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Jan 2021 13:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16105455955313 (code B ref -1); Wed, 13 Jan 2021 13:47:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jan 2021 13:46:35 +0000 Original-Received: from localhost ([127.0.0.1]:34687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzgTr-0001Nd-0p for submit@debbugs.gnu.org; Wed, 13 Jan 2021 08:46:35 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzgTp-0001NV-Ns for submit@debbugs.gnu.org; Wed, 13 Jan 2021 08:46:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzgTp-0003Kw-DN for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2021 08:46:33 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:41929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzgTn-0003G3-8U for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2021 08:46:33 -0500 X-Originating-IP: 94.46.225.161 Original-Received: from kronos (unknown [94.46.225.161]) (Authenticated sender: public@protesilaos.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 501ACE0009 for ; Wed, 13 Jan 2021 13:46:26 +0000 (UTC) Received-SPF: none client-ip=217.70.183.196; envelope-from=info@protesilaos.com; helo=relay4-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197895 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Remove-hardcoded-underline-for-perl-mode-variables.patch >From 69c6c946f24520edf34ea474290054c3ceb0cc0a Mon Sep 17 00:00:00 2001 From: Protesilaos Stavrou 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 --=-=-=--