From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#5064: 23.1.50; perl mode coloring gone if subroutine name is one letter long Date: Sat, 28 Nov 2009 14:41:03 -0500 Message-ID: References: <87ocmn8lyj.fsf@jidanni.org> Reply-To: Stefan Monnier , 5064@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259438922 3711 80.91.229.12 (28 Nov 2009 20:08:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Nov 2009 20:08:42 +0000 (UTC) Cc: 5064@emacsbugs.donarmstrong.com To: jidanni@jidanni.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 28 21:08:35 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NETat-0005ju-7H for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Nov 2009 21:08:35 +0100 Original-Received: from localhost ([127.0.0.1]:40014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NETas-0003iX-KW for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Nov 2009 15:08:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NETZr-0003D9-Hy for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 15:07:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NETZm-00038K-SB for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 15:07:30 -0500 Original-Received: from [199.232.76.173] (port=39736 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NETZm-00038A-F4 for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 15:07:26 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:35237) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NETZm-00052D-2P for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 15:07:26 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nASK7NAN005221; Sat, 28 Nov 2009 12:07:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nASJo5aU002604; Sat, 28 Nov 2009 11:50:05 -0800 Resent-Date: Sat, 28 Nov 2009 11:50:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 28 Nov 2009 19:50:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 5064 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5064-submit@emacsbugs.donarmstrong.com id=B5064.12594372711989 (code B ref 5064); Sat, 28 Nov 2009 19:50:04 +0000 Original-Received: (at 5064) by emacsbugs.donarmstrong.com; 28 Nov 2009 19:41:11 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nASJf9G6001986 for <5064@emacsbugs.donarmstrong.com>; Sat, 28 Nov 2009 11:41:11 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYEAOcKEUtFpYc//2dsb2JhbACBTdIDhDEEihk X-IronPort-AV: E=Sophos;i="4.47,306,1257138000"; d="scan'208";a="50247492" Original-Received: from 69-165-135-63.dsl.teksavvy.com (HELO pastel.home) ([69.165.135.63]) by ironport2-out.pppoe.ca with ESMTP; 28 Nov 2009 14:41:04 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 7E51180E3; Sat, 28 Nov 2009 14:41:03 -0500 (EST) In-Reply-To: <87ocmn8lyj.fsf@jidanni.org> (jidanni@jidanni.org's message of "Sat, 28 Nov 2009 09:41:40 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 28 Nov 2009 15:07:30 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33017 Archived-At: > Gentlemen, consider the following perl subroutines. > Notice how the latter has all its coloring gone, just because it starts > with one letter. (perl-mode)^X^E > sub max { > my $max = shift(@_); > foreach $foo (@_) { > $max = $foo if $max < $foo; > } > return $max; > } > sub m { > my $max = shift(@_); > foreach $foo (@_) { > $max = $foo if $max < $foo; > } > return $max; > } Actually, the problem is not really that it's only one letter, but that it's the "keyword" m, used for matching (as in "m/regexp/"). Of course the same can happen with other keywords like "s", "tr", "y", "q", "qx", and various others. I'm not sure if such a function definition is valid. Does Perl accept it and can you actually call this function? Stefan