From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: perl-mode "::" as word character [patch] Date: Thu, 05 May 2005 23:02:20 -0400 Message-ID: <87br7pkr2z.fsf-monnier+emacs@gnu.org> References: <427329F6.5080508@pacbell.net> <427AC615.1000703@pacbell.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115349572 9256 80.91.229.2 (6 May 2005 03:19:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 May 2005 03:19:32 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 06 05:19:29 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTtMs-0003aT-Ke for ged-emacs-devel@m.gmane.org; Fri, 06 May 2005 05:19:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTtU7-0004t6-2L for ged-emacs-devel@m.gmane.org; Thu, 05 May 2005 23:26:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DTtDs-0006dm-RJ for emacs-devel@gnu.org; Thu, 05 May 2005 23:09:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DTtDj-0006Ya-Tr for emacs-devel@gnu.org; Thu, 05 May 2005 23:09:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTtDe-0006Pn-Pn for emacs-devel@gnu.org; Thu, 05 May 2005 23:09:38 -0400 Original-Received: from [209.226.175.25] (helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DTtBo-0004AI-Nn for emacs-devel@gnu.org; Thu, 05 May 2005 23:07:44 -0400 Original-Received: from alfajor ([65.92.243.232]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050506030222.KVBO26128.tomts5-srv.bellnexxia.net@alfajor>; Thu, 5 May 2005 23:02:22 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 17354D72F6; Thu, 5 May 2005 23:02:20 -0400 (EDT) Original-To: Pandora In-Reply-To: <427AC615.1000703@pacbell.net> (Pandora's message of "Thu, 05 May 2005 18:19:17 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36744 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36744 >> Word syntax is clearly wrong. Symbol syntax (i.e. "_") OTOH sounds right. > I would be happy to agree. But \\s_ doesn't seem to match anything, and It matches any char marked with the _ syntax, which is the syntax to use for chars which are not word-chars but are allowed as part of symbols. > \\sw doesn't match anything designated as ("\\(::\\)" (1 "_")). Of course not. To match a symbol try "\\(\\sw\\|\\s_)+". > It only matches "w". Word syntax may be "wrong" for English, but in perl > ':' is equivalent to A or q or whatever. No, it's not the same thing. Emacs distinguishes words from symbols and it's quite handy sometimes. > I'll go with the precedent, but if it's better without, you can remove > both the 'starting-with-&' and the 'followed-by-a-(' expressions. > They're both pretty equivocably defined as function calls, not function > definitions, in perl. Agreed. > "\\(?:\\\\|\\\\)\\s *\\(\\sw+\\)\\s *(" and... then > how to make that /not/ highlighted, while every other > "\\(\\sw+\\)\\s *(" gets highlighted as a function call? Aren't there more cases? like print HANDLE (arg1, arg2) ? >> Could you (re)send a context diff rather than plain diff? > Um, sure. Thank you. Stefan