From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: char syntax of the $ in $var Date: Wed, 23 Mar 2005 09:05:18 +0900 Message-ID: References: <87oedb2sh4.fsf@robotron.ath.cx> Reply-To: snogglethorpe@gmail.com, miles@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1111536411 5469 80.91.229.2 (23 Mar 2005 00:06:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2005 00:06:51 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 01:06:51 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DDtNu-0003h4-JW for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2005 01:06:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDtfI-0003re-19 for ged-emacs-devel@m.gmane.org; Tue, 22 Mar 2005 19:24:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DDtcu-00033y-Jl for emacs-devel@gnu.org; Tue, 22 Mar 2005 19:21:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DDtcq-00032F-IR for emacs-devel@gnu.org; Tue, 22 Mar 2005 19:21:33 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDtcp-00031x-R1 for emacs-devel@gnu.org; Tue, 22 Mar 2005 19:21:31 -0500 Original-Received: from [64.233.184.194] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DDtN9-0005Gf-1v for emacs-devel@gnu.org; Tue, 22 Mar 2005 19:05:19 -0500 Original-Received: by wproxy.gmail.com with SMTP id 40so139797wri for ; Tue, 22 Mar 2005 16:05:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=DuYBnO1/3T5agwvgKeLK4bnFWCUR+xLicRIPhadPOrYsKJNL9j/eNrn55V++lEI3xUaHn29nmpli8AaenAHShLf3Fexvaz/SU0ZhrfW/reyzGeI7ApWf20/bRCYrC5FdMR6qZ6ah06DkaBabbULz7i1wkUDOkr1uNcvEzo81Uws= Original-Received: by 10.54.12.40 with SMTP id 40mr236768wrl; Tue, 22 Mar 2005 16:05:18 -0800 (PST) Original-Received: by 10.54.19.70 with HTTP; Tue, 22 Mar 2005 16:05:18 -0800 (PST) Original-To: emacs-devel@gnu.org In-Reply-To: <87oedb2sh4.fsf@robotron.ath.cx> 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:35013 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35013 On Wed, 23 Mar 2005 00:03:51 +0100, David Hansen wrote: > in sh-mode: the $ in $test has syntax 2 = word in perl-mode > syntax 10 = character quote and in cperl-mode it's 9 = escape. > > I think it should at least be unique (I prefer the sh-mode > version as you can move the point across variables with M-f and > M-b). Perl and sh are not identical in the way they treat the "$" in variable names -- indeed it seems that the current state of things is _backwards_: In sh, the $ is not really part of the name, so having emacs think it is can be quite annoying (the case that drives me nuts is that dynamic-abbrev won't complete `$FO' based on a previous `FOO_BAR=...'); this argues for giving the $ a non-word syntax. In perl, on the other hand, the $ is treated much more as if it's actually part of the variable name (e.g., you write `$foo = 3'), so giving the $ word syntax might the right thing to do for perl. -Miles -- Do not taunt Happy Fun Ball.