emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: char syntax of the $ in $var


From: Stefan
Subject: Re: char syntax of the $ in $var
Date: Wed, 23 Mar 2005 08:27:59 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

>> 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).

I decided the quote syntax for perl-mode, so I'm biased.  But in any case
word-syntax for $ is wrong, just like it is wrong for _ or - or any other
non-alphabetic char.  Strangely, tho, $ has word syntax in fundamental mode
(which is from where sh-script inherits it, oddly enough).  Shouldn't it be
changed to quote syntax or symbol syntax (in fundamental-mode)?

In general, in Perl, $ plays many different roles and it should sometimes
have word/symbol/quote syntax, sometimes have escape syntax, perl-mode and
cperl-mode chose different defaults, and then tweak them on a case by case
basis with font-lock-syntactic-keywords.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]