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: Miles Bader
Subject: Re: char syntax of the $ in $var
Date: Wed, 23 Mar 2005 09:05:18 +0900

On Wed, 23 Mar 2005 00:03:51 +0100, David Hansen <address@hidden> 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.




reply via email to

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