From xemacs-m  Thu Jun 19 17:32:23 1997
Received: from steadfast.teradyne.com (steadfast.teradyne.com [131.101.1.200])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id RAA00338
	for <xemacs-beta@xemacs.org>; Thu, 19 Jun 1997 17:32:22 -0500 (CDT)
Received: from engine.ecf.teradyne.com (engine.ecf.teradyne.com [131.101.192.6]) by steadfast.teradyne.com (8.7.1/8.7.1) with ESMTP id NAA24190; Thu, 19 Jun 1997 13:29:50 -0400 (EDT)
Received: from midnight.eng.ecf.teradyne.com (midnight.ecf.teradyne.com [131.101.192.49]) by engine.ecf.teradyne.com (8.7.1/8.7.1) with SMTP id TAA29305; Thu, 19 Jun 1997 19:24:34 +0200 (MET DST)
Received: by midnight.eng.ecf.teradyne.com (SMI-8.6/SMI-SVR4)
	id TAA06503; Thu, 19 Jun 1997 19:24:33 +0200
To: XEmacs Beta Mailing List <xemacs-beta@xemacs.org>
Cc: ilya@math.mps.ohio-state.edu, arius@informatik.uni-erlangen.de
Subject: cperl-mode syntax table problem/fix?
X-Face: 4[iHdXiTu\V3u[~\I)<f9HC);%~nG8`oUqv#uzvs6=\V{AjN6Sn
 c/qi;YLwRmEbt8Y*=j5n(urqY@chPh@J'D"QlqD!C8>*}#kYF[-tYl3VZga/HSOP|K,{L
 Rtu@f0y/=O&Cu}\:~d|P$JON?pn?j,&CnPb1z#/TL9bkAJwyol&a:SvYj-VYbM=Dtxhk9
 =w|R6U3_;SH&B<Mfy6Q%#
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: multipart/mixed;
 boundary="Multipart_Thu_Jun_19_19:24:31_1997-1"
Content-Transfer-Encoding: 7bit
From: Adrian Aichner <aichner@ecf.teradyne.com>
Date: 19 Jun 1997 19:24:32 +0200
Message-ID: <rxsen9y4ib3.fsf@midnight.ecf.teradyne.com>
Lines: 96
X-Mailer: Gnus v5.4.56/XEmacs 20.3(beta7) - "Oslo"

--Multipart_Thu_Jun_19_19:24:31_1997-1
Content-Type: text/plain; charset=US-ASCII


Hello All,

I came across a problem with cperl-mode in emacs-version "20.3
\"Oslo\" XEmacs Lucid (beta7)".


--Multipart_Thu_Jun_19_19:24:31_1997-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="time_and_print.pl"
Content-Transfer-Encoding: 7bit

sub time_and_print {
}

--Multipart_Thu_Jun_19_19:24:31_1997-1
Content-Type: text/plain; charset=US-ASCII


will be font-locked as follows with

(setq cperl-hairy t)

as determined by `list-text-properties-at'.

---
sub
---
Text properties at 2:

face                 font-lock-keyword-face
font-lock            t

---------
time, and
---------
Text properties at 7:

face                 font-lock-type-face
font-lock            t

-----
print
-----
Text properties at 15:

face                 font-lock-other-type-face
font-lock            t

_ has no text properties at all.

By changing the syntax table entry for `_' from symbol-constituent to
word-constituent I can fix this problem.

sub is displayed with font-lock-keyword-face
and time_and_print with font-lock-function-name-face, as it should!

I have not encountered any problems I may have caused by this change.

What do you experts think of this change?
  
Please try following patch, if you're of the brave kind:


--Multipart_Thu_Jun_19_19:24:31_1997-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="*vc-diff*"
Content-Transfer-Encoding: 7bit

*** 1.1	1997/06/19 16:43:13
--- cperl-mode.el	1997/06/19 16:45:26
***************
*** 843,849 ****
    (modify-syntax-entry ?# "<" cperl-mode-syntax-table)
    (modify-syntax-entry ?' "\"" cperl-mode-syntax-table)
    (modify-syntax-entry ?` "\"" cperl-mode-syntax-table)
!   (modify-syntax-entry ?_ "_" cperl-mode-syntax-table)
    (modify-syntax-entry ?: "_" cperl-mode-syntax-table)
    (modify-syntax-entry ?| "." cperl-mode-syntax-table))
  
--- 843,849 ----
    (modify-syntax-entry ?# "<" cperl-mode-syntax-table)
    (modify-syntax-entry ?' "\"" cperl-mode-syntax-table)
    (modify-syntax-entry ?` "\"" cperl-mode-syntax-table)
!   (modify-syntax-entry ?_ "w" cperl-mode-syntax-table)
    (modify-syntax-entry ?: "_" cperl-mode-syntax-table)
    (modify-syntax-entry ?| "." cperl-mode-syntax-table))

Regards,

Adrian

--Multipart_Thu_Jun_19_19:24:31_1997-1--

