🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #87722

fontifying perl code bug

#87722
From: Erez Zadok, HWank1
Date: Sat, 03 Sep 1994 23:03
26 lines
1787 bytes
[my first attempt at mailing this was incomplete -Erez]

In GNU Emacs 19.25.1 of Thu Jun  2 1994 on ober.cs.columbia.edu (sparc-sun-solaris2)

Here is a snippet of legal perl-4 code (from the mirror.pl package) which
fails to fontify using the default regexps:

#!/usr/local/gnu/bin/perl
# Some systems hold the username in $USER, some in $LOGNAME.
$me = $ENV{'USER'} || $ENV{'LOGNAME'};
# Files matching this pattern are usually compressed.
$squished = '\.(Z|z|gz)$';
# special /bin/sh chars that must be escaped.
$shell_metachars = '\"|\$|`|\\\\';
# Remote directory parsing fail if not given input every readtime seconds.
$parse_time = 600;

The quoted assigned value to $squished confuses the rules, and the rest of
the perl code all the way to the end of the file gets assigned to the same
face as strings.  Essentially the "$" at the end of the perl (to be used as
a) regexp for $squished gets it into trouble.

Interestingly enough, parts of the expression for the next variable
$shell_metachars show up in a different (default) face.

Erez.
Technical Details
Message-ID: <199409032258.SAA00096@shekel.mcl.cs.columbia.edu>
Path: arc1-ca.pugleaf.net!nntp.gmd.de!xlink.net!slsv6bt!slbh01.bln.sel.alcatel.de!rcvie!Austria.EU.net!EU.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cs.columbia.edu!ezk

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,e3d966f70d0fb36
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-09-05 12:12:48 PST
Path: arc1-ca.pugleaf.net!nntp.gmd.de!xlink.net!slsv6bt!slbh01.bln.sel.alcatel.de!rcvie!Austria.EU.net!EU.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cs.columbia.edu!ezk
From: ezk@cs.columbia.edu (Erez  Zadok, HWank1)
Newsgroups: gnu.emacs.bug
Subject: fontifying perl code bug
Date: 3 Sep 1994 19:03:54 -0400
Organization: GNUs Not Usenet
Lines: 27
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <199409032258.SAA00096@shekel.mcl.cs.columbia.edu>