GNU bug report logs - #47112
cperl-mode: Wrong highlighting of tr, y, q with _

Previous Next

Package: emacs;

Reported by: "E. Choroba" <choroba <at> matfyz.cz>

Date: Fri, 12 Mar 2021 20:33:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


Message #8 received at 47112 <at> debbugs.gnu.org (full text, mbox):

From: haj <at> posteo.de (Harald Jörg)
To: 47112 <at> debbugs.gnu.org
Subject: Don't interpret '_' as word boundary [PATCH]
Date: Sat, 13 Mar 2021 01:27:16 +0100
[Message part 1 (text/plain, inline)]
This is a border case which affects several dark corners in CPerl mode.
Per default, the '_' character is not a word character, but a symbol
character in Perl.

The bogus regexp in `cperl-find-pods-heres' checks the quote-like things
for "ending in a word boundary".  Per default there _is_ a word boundary
between 'y' and '_', and from here it goes downward.

It is wrong to change the search pattern to "symbol boundary" instead of
"word boundary": The ':' character is also a symbol in CPerl mode and
the regexp would then miss q:string: constructs.

The patch is a small change to eliminate the false detection of
quote constructs by yet another special case, plus some tests.
-- 
Cheers,
haj
[0001-cperl-mode-Don-t-interpret-y_-as-start-of-y-function.patch (text/x-diff, attachment)]

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

Previous Next


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