all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#69604: perl mode: quotes give wrong colors
@ 2024-03-07  8:53 Dan Jacobson
  2024-03-08  7:25 ` bug#69604: perl-mode and cperl-mode: $\" in a double-quoted string Harald Jörg
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Jacobson @ 2024-03-07  8:53 UTC (permalink / raw)
  To: 69604

$ cat r.pl
print "0$\"$_$/";
print "$_$\"0$/";
$ perl -c r.pl
r.pl syntax OK
$ emacs -Q r.pl
emacs-version "29.2"





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#69604: perl-mode and cperl-mode: $\" in a double-quoted string
  2024-03-07  8:53 bug#69604: perl mode: quotes give wrong colors Dan Jacobson
@ 2024-03-08  7:25 ` Harald Jörg
  2024-03-08  8:32   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Harald Jörg @ 2024-03-08  7:25 UTC (permalink / raw)
  To: 69604

Good catch!  The same symptoms can be seen in cperl-mode.

Both perl-mode and cperl-mode treat "$" as quoting character in their
syntax tables.  This is needed for Perl's punctuation variables like $(
and $" which would otherwise be interpreted as unbalanced parens or
quotes.

In a string, this safety belt is not required, and it actually misfires
in the case of "$\"", which is part of the demo code.

This is now treated correctly in the Emacs master branch for both
perl-mode and cperl-mode.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#69604: perl-mode and cperl-mode: $\" in a double-quoted string
  2024-03-08  7:25 ` bug#69604: perl-mode and cperl-mode: $\" in a double-quoted string Harald Jörg
@ 2024-03-08  8:32   ` Eli Zaretskii
  2024-03-08 10:09     ` Harald Jörg
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-03-08  8:32 UTC (permalink / raw)
  To: Harald Jörg; +Cc: 69604

> From: Harald Jörg <haj@posteo.de>
> Date: Fri, 08 Mar 2024 07:25:45 +0000
> 
> Good catch!  The same symptoms can be seen in cperl-mode.
> 
> Both perl-mode and cperl-mode treat "$" as quoting character in their
> syntax tables.  This is needed for Perl's punctuation variables like $(
> and $" which would otherwise be interpreted as unbalanced parens or
> quotes.
> 
> In a string, this safety belt is not required, and it actually misfires
> in the case of "$\"", which is part of the demo code.
> 
> This is now treated correctly in the Emacs master branch for both
> perl-mode and cperl-mode.

Thanks.  Should this bug be closed now?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#69604: perl-mode and cperl-mode: $\" in a double-quoted string
  2024-03-08  8:32   ` Eli Zaretskii
@ 2024-03-08 10:09     ` Harald Jörg
  0 siblings, 0 replies; 4+ messages in thread
From: Harald Jörg @ 2024-03-08 10:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 69604

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Harald Jörg <haj@posteo.de>
>> Date: Fri, 08 Mar 2024 07:25:45 +0000
>> 
>> Good catch!  The same symptoms can be seen in cperl-mode.
>> 
>> Both perl-mode and cperl-mode treat "$" as quoting character in their
>> syntax tables.  This is needed for Perl's punctuation variables like $(
>> and $" which would otherwise be interpreted as unbalanced parens or
>> quotes.
>> 
>> In a string, this safety belt is not required, and it actually misfires
>> in the case of "$\"", which is part of the demo code.
>> 
>> This is now treated correctly in the Emacs master branch for both
>> perl-mode and cperl-mode.
>
> Thanks.  Should this bug be closed now?

Yes!  I have closed it now.
-- 
Cheers,
haj





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-08 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-07  8:53 bug#69604: perl mode: quotes give wrong colors Dan Jacobson
2024-03-08  7:25 ` bug#69604: perl-mode and cperl-mode: $\" in a double-quoted string Harald Jörg
2024-03-08  8:32   ` Eli Zaretskii
2024-03-08 10:09     ` Harald Jörg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.