GNU bug report logs -
#43916
$$, $@, $bla colors in Perl mode vs. Shell-script mode
Previous Next
Full log
Message #26 received at 43916 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi!
On Tue, Oct 20, 2020 at 6:42 AM 積丹尼 Dan Jacobson <jidanni <at> jidanni.org> wrote:
>
> >>>>> "LI" == Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> LI> 積丹尼 Dan Jacobson <jidanni <at> 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
[emacs_4h1pZBfvyO.png (image/png, attachment)]
This bug report was last modified 4 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.