From: Stefan <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, miles@gnu.org
Subject: Re: char syntax of the $ in $var
Date: Wed, 23 Mar 2005 08:27:59 -0500 [thread overview]
Message-ID: <m164zipkng.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <fc339e4a050322160571207726@mail.gmail.com> (Miles Bader's message of "Wed, 23 Mar 2005 09:05:18 +0900")
>> 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
prev parent reply other threads:[~2005-03-23 13:27 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
2005-03-23 0:43 ` David Hansen
2005-03-23 9:57 ` Kim F. Storm
2005-03-23 13:27 ` Stefan [this message]
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=m164zipkng.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--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).