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: David Hansen
Subject: Re: char syntax of the $ in $var
Date: Wed, 23 Mar 2005 01:43:32 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

On Wed, 23 Mar 2005 09:05:18 +0900 Miles Bader wrote:

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

Sounds reasonable.

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

You'll run into the same completion problems with e.g %foo and
$foo{'bar'}.  So probably all non-word syntax...

David





reply via email to

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