[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45114: perl-mode warns about mismatched parentheses wrongly
From: |
Harald Jörg |
Subject: |
bug#45114: perl-mode warns about mismatched parentheses wrongly |
Date: |
Tue, 08 Dec 2020 12:13:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> $ emacs file.pl # and start typing
> if(/^[^}]/) ...
>
> During the process you will get spurious warnings about mismatched
> parentheses etc.
>
> emacs-version "27.1"
This is a general Emacs-ism: The warning appears in any mode, not just
in Perl mode. So, in any environment of Perl mode: in code, but also in
strings, comments, and POD - and in character classes of a regex.
Whenever you type [}, the warning will appear (also in Gnus' message
mode, as I just experienced).
The current message texts "Mismatched parentheses" and "No matching
parenthesis found" _look_ pretty much like error messages from a
compiler, or from a syntax-aware programming mode. They always make me
wince.
I suggest to change the message texts to clarify that no effort was
taken to find out whether the mismatch is significant, like this:
Note: no matching paren shown
Would that be acceptable?
I guess this bug can be merged with Bug#24299?
--
Cheers,
haj
bug#45114: perl-mode warns about mismatched parentheses wrongly,
Harald Jörg <=