all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#64190: 30.0.50; cperl-mode.el: bad recognition of multiline declarations
@ 2023-06-20 11:13 Harald Jörg
  2023-07-01 20:20 ` bug#64190: Multiline declarations in cperl-mode are fixed in the repository Harald Jörg
  0 siblings, 1 reply; 2+ messages in thread
From: Harald Jörg @ 2023-06-20 11:13 UTC (permalink / raw)
  To: 64190

Owner: haj@posteo.de

In CPerl mode, several constructs aren't recognized when they span
several lines, leading to bad fontification and indentation.  "Modern"
Perl declarations like subroutine signatures and class attributes are
more likely to span more than one line, so this should be fixed.

Example 1 (copy to a buffer and run M-x cperl-mode):
Only the first line is fontified here:
----------------------------------------------------------------------
my ($var1,
    $var2,
    $var3)
----------------------------------------------------------------------

Example 2 (copy to a buffer and run M-x cperl-mode):
The package name isn't fontified.
----------------------------------------------------------------------
package Foo
    0.1;
----------------------------------------------------------------------

Example 3 (this happens only while entering that code): When you type in
a subroutine like this, the subroutine name isn't fontified.
----------------------------------------------------------------------
sub do_stuff
{
    ...;
}
----------------------------------------------------------------------

Example 4 (this happens only while typing):  Put the cursor at the
beginning of the second line and enter a space.  The rest of the buffer
is fontified as string.
----------------------------------------------------------------------
sub do_stuff ($param1,
$param2)
{
   ...;
}

sub oops { ...; }
----------------------------------------------------------------------

Examples 3 and 4 can be recovered from by running M-x cperl-find-pods-heres
or by restarting M-x cperl-mode: They are caused by cperl-mode not
reacting correctly to calls from jit-lock.

-- 
Cheers,
haj





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#64190: Multiline declarations in cperl-mode are fixed in the repository.
  2023-06-20 11:13 bug#64190: 30.0.50; cperl-mode.el: bad recognition of multiline declarations Harald Jörg
@ 2023-07-01 20:20 ` Harald Jörg
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Jörg @ 2023-07-01 20:20 UTC (permalink / raw)
  To: 64190-done

Fontification of multiline signatures has been fixed in the Emacs master
branch.  cperl-mode.el as available in the repository can be used with
Emacs 28 and 27 (and could be backported to Emacs 26 if there is
interest).

-- 
Cheers,
haj





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-01 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20 11:13 bug#64190: 30.0.50; cperl-mode.el: bad recognition of multiline declarations Harald Jörg
2023-07-01 20:20 ` bug#64190: Multiline declarations in cperl-mode are fixed in the repository Harald Jörg

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.