unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Miles Bader <snogglethorpe@gmail.com>
Subject: Re: char syntax of the $ in $var
Date: Wed, 23 Mar 2005 09:05:18 +0900	[thread overview]
Message-ID: <fc339e4a050322160571207726@mail.gmail.com> (raw)
In-Reply-To: <87oedb2sh4.fsf@robotron.ath.cx>

On Wed, 23 Mar 2005 00:03:51 +0100, David Hansen <david.hansen@gmx.net> 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	other threads:[~2005-03-23  0:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-22 23:03 char syntax of the $ in $var David Hansen
2005-03-23  0:05 ` Miles Bader [this message]
2005-03-23  0:43   ` David Hansen
2005-03-23  9:57   ` Kim F. Storm
2005-03-23 13:27   ` Stefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc339e4a050322160571207726@mail.gmail.com \
    --to=snogglethorpe@gmail.com \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).