mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
cperl-mode.el: Update for the current Perl version 5.040
* etc/NEWS: Announce new features of cperl-mode. * lisp/progmodes/cperl-mode.el (cperl-menu): Add toggle for extra paired delimiters. (defconst): new rx expressions `cperl--sub-name-generated-rx' and `cperl--field-declaration-rx' (cperl--imenu-entries-rx): Use the new expressions (cperl--extra-paired-delimiters): New variable holding the paired delimiters for Perl 5.36 and newer (cperl-imenu-sub-keywords): Add autogenerated methods to imenu (cperl-init-faces): Add the __CLASS__ token, builtin constants, and attributes for field declarations. (cperl-short-docs): Add __CLASS__ to one-line docs. (cperl-extra-paired-delimiters-mode): new minor mode to handle non-ASCII paired delimiters. * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-fontify-builtin-constants): new test. (cperl-test-fontify-class): New test clauses for attributes. (cperl-test-field-declaration-rx): new test. (cperl-test-autogenerated-reader-rx): new unit test for the rx expression. (cperl-test-extra-delimiters): new test. (cperl-test-imenu-index): new clauses for imenu capture of autogenerated methods. * test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add examples for Perl 5.40 syntax. * test/lisp/progmodes/cperl-mode-resources/extra-delimiters.pl: New resource for non-ASCII paired delimiters.
This commit is contained in:
parent
5416889873
commit
060c48435f
6 changed files with 599 additions and 23 deletions
|
|
@ -194,4 +194,16 @@ class Class::Class 0.01 {
|
|||
}
|
||||
}
|
||||
|
||||
=head1 Perl 5.40 brings new stuff
|
||||
|
||||
The __CLASS__ token (only for fontification) and the :reader
|
||||
method-generator for classes are available with Perl 5.40.
|
||||
|
||||
=cut
|
||||
|
||||
class With::Readers {
|
||||
field $simple;
|
||||
field $auto_reader :reader;
|
||||
field $named_reader :reader(named);
|
||||
}
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue