Re^3: IDE for Perl programming? ( *cperl-mode* )
by LanX (Saint) on Mar 12, 2021 at 13:18 UTC
|
Yes cperl's syntax parsing is great, I use it for auto-indentation and formatting, which happens far faster than shelling out to perltidy.
Though (tangential!) it's giving me a hardtime ATM, because I have y_max somewhere in my code/comments/pod and it thinks it's an unfinished tr with _ as delimiter.
update
Added (cperl-mode) to title and considered to reparent this sub-thread into an own one
EDIT: please own thread possible, quite a drift ? | [reply] [d/l] [select] |
|
sub y_max {
1
}
Send a patch or report to the maintainers.
Update: Done.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
| [reply] [d/l] [select] |
|
I think you meant mailing to bug-gnu-emacs@gnu.org ?
I doubt the general emacs staff can handle this, this should be done by the cperl maintainers, which leads to an interesting question....
Which and who's cperl-version is bundled with emacs?
| [reply] [d/l] |
|
|
|
|
|
|
This particular bug should be already fixed in the Emacs repository, available as cperl-mode.el. However, it is only backported to Emacs versions 26.1 and above.
| [reply] |
|
Are you sure? I'm on emacs 27.1 with cperl-mode symlinked from the latest git version, but still see
sub y_max {
1
}
highlighted as a transliteration.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
| [reply] [d/l] [select] |
|
|
DB<21> $_= "ab"x6
DB<22> use strict; y _a_X_
DB<23> p
XbXbXbXbXbXb
DB<23>
Though I must say this is one of the features of Perl I wouldn't ever miss...
... can we please have a feature to switch that (and y ) off?
Pretty please!
| [reply] [d/l] [select] |
|
There's also the opposite case where you must not use whitespace:
# This works and means the string 'foo':
q#foo#
# This is a single q, #foo# is a comment.
q #foo#
Funny, eh?
| [reply] [d/l] |
|
|
Yes, it is a bug in the parser. In that monstrosity which analyses POD, Here-docs, regexes, and quote-like constructs, because in all of these things characters may change their meaning. choroba filed Bug#47112, a quick patch is coming soon.
By the way: You can, in fact, eliminate that bug without any patch by setting the customizable variable cperl-under-as-char to t.
Sigh. This dates back to a change Richard M. Stallman himself committed in 1998. Let's see whether I manage to revert that.
| [reply] |
|
|
|
|
|
|
Re^3: IDE for Perl programming?
by LanX (Saint) on Mar 12, 2021 at 18:59 UTC
|
> The integration with "speedbar"
I think you mean Cperl's support for Imenu which helps me - among other stuff - to jump-to-definition of subs under the cursor.
I'm not using Speedbar but ECB on top and both can use Imenu as backend to list all subs in an extra panel instead of a drop-down menu-list.
edit
at the time I was experimenting with Speedbar it insisted in opening an extra "docked" window instead of splitting the current one, which was really kind of annoying. I know it's better nowadays.
| [reply] |
|
Yes, the support is for imenu. I highlighted speedbar because it has been mentioned in this thread.
The vanilla M-x speedbar still opens an extra window ("frame" in Emacs lingo), but MELPA offers sr-speedbar which uses the same frame. I haven't tried it myself, though.
| [reply] |
|
> Yes, the support is for imenu.
I just looked into the docs for imenu and realized that emacs has a which-function-mode to dynamically update the name of the current function in the mode bar when navigating...
Needed this, reading helped.
| [reply] [d/l] |