From: Corwin Brust <corwin@bru.st>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 43916@debbugs.gnu.org
Subject: bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode
Date: Wed, 21 Oct 2020 01:25:23 -0500 [thread overview]
Message-ID: <CAJf-WoR=ijF454Rbsb5yskYH1k4YP6vMR_XFVfZiLrzV+UfEbQ@mail.gmail.com> (raw)
In-Reply-To: <874kmqjksr.5.fsf@jidanni.org>
[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]
Hi!
On Tue, Oct 20, 2020 at 6:42 AM 積丹尼 Dan Jacobson <jidanni@jidanni.org> wrote:
>
> >>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
> LI> 積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
>
> >> OK but that doesn't explain the inconsistencies within the same language seen.
>
> LI> The $ is the same colour in Perl mode, so you'll have to be more
> LI> specific about what inconsistencies you're referring to.
>
> All I know is in perl mode,
> $$, $@, $bla
> BB, BB, BTTT (Black, Tan)
>
> So it should be
> BT, BT, BTTT like Shell-script mode,
> or
> BB, BB, BBBB
> or
> TT, TT, TTTT.
I think what we have now makes sense. I've tried to attach a
screenshot of a -Q session but with (setq cperl-hairy t)
In essence, what I think I see is that cperl will color the whole
array or hash variable including the @ or % sigil when it used as
such, however, when a sigil is used to dereference only sigils is
colored for the hash or array - the scalar being derefered is colored
per scalar (e.g. tan). This is perhaps the most immediately obvious
difference between perl and cperl-mode and probably a big part of why
I think that cperl provides much better visual feedback than
perl-mode. (As an aside, I've long wondered if there are people who
perl-mode to cperl-mode and if disagreement about this drives that
preference.)
One thing I could wish for is that scalars used within hash and array
access would be colored just as they are otherwise, e.g. using the tan
color for the $scalar in $arr[$scalar] and $hash{$scalar}.
Otherwise I'm pretty happy; I've not found a better Perl editing
experience than Emacs cperl-mode.
Thanks for your work on this feature!
Corwin
[-- Attachment #2: emacs_4h1pZBfvyO.png --]
[-- Type: image/png, Size: 25239 bytes --]
next prev parent reply other threads:[~2020-10-21 6:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-10 23:04 bug#43916: $$, $@, $bla colors in Perl mode vs. Shell-script mode 積丹尼 Dan Jacobson
2020-10-11 4:35 ` Lars Ingebrigtsen
2020-10-15 23:50 ` 積丹尼 Dan Jacobson
2020-10-16 5:07 ` Lars Ingebrigtsen
2020-10-18 3:52 ` 積丹尼 Dan Jacobson
2020-10-19 7:57 ` Lars Ingebrigtsen
2020-10-19 15:29 ` 積丹尼 Dan Jacobson
2020-10-21 6:25 ` Corwin Brust [this message]
2020-10-21 22:45 ` 積丹尼 Dan Jacobson
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='CAJf-WoR=ijF454Rbsb5yskYH1k4YP6vMR_XFVfZiLrzV+UfEbQ@mail.gmail.com' \
--to=corwin@bru.st \
--cc=43916@debbugs.gnu.org \
--cc=jidanni@jidanni.org \
--cc=larsi@gnus.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).