[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47112: Don't interpret '_' as word boundary [PATCH]
From: |
Harald Jörg |
Subject: |
bug#47112: Don't interpret '_' as word boundary [PATCH] |
Date: |
Sat, 13 Mar 2021 01:27:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
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
Description: cperl-mode: No word boundary in "y_"