]> git.eshelyaron.com Git - emacs.git/commit
cperl-mode.el: Allow non-ASCII Perl identifiers
authorHarald Jörg <haj@posteo.de>
Tue, 14 Sep 2021 15:53:52 +0000 (17:53 +0200)
committerHarald Jörg <haj@posteo.de>
Tue, 14 Sep 2021 15:53:52 +0000 (17:53 +0200)
commit3d49ad73e5a93625629c96b6c0b921bb019ea9da
treed71c35a755bb8fe45c134571dbc3f346fb13595a
parent89068554d7d0e9970a7269a0963e7a2bd0b1cc99
cperl-mode.el: Allow non-ASCII Perl identifiers

Replace all "A-Z" regexp literals with unicode-aware rx constructs
wherever Perl allows non-ASCII identifiers.
* lisp/progmodes/cperl-mode.el (cperl-after-sub-regexp)
(cperl-after-label. cperl-sniff-for-indent)
(cperl-find-pods-heres, cperl-indent-exp)
(cperl-fix-line-spacing, cperl-imenu--create-perl-index)
(cperl-init-faces, cperl-find-tags):
Replace ASCII regex literals by unicode-aware rx constructs.
(cperl-init-faces): Eliminate unused lexical `font-lock-anchored'.
(cperl-have-help-regexp, cperl-word-at-point-hard): Allow non-ASCII
word characters.

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-special-variables): New test for $^T
and $^{VARNAME}.
(cperl-test-ws-rx cperl-test-ws+-rx),
(cperl-test-version-regexp, cperl-test-package-regexp): Skip
for perl-mode.
(cperl-test-identifier-rx, cperl--test-unicode-setup)
(cperl-test-unicode-labels, cperl-test-unicode-sub)
(cperl-test-unicode-varname)
(cperl-test-unicode-varname-list, cperl-test-unicode-arrays)
(cperl-test-unicode-hashes, cperl-test-unicode-hashref)
(cperl-test-unicode-proto, cperl-test-unicode-fhs)
(cperl-test-unicode-hashkeys, cperl-test-word-at-point):
New tests for unicode identifiers.
 (cperl-test-imenu-index): Add a unicode identifier to the test.

* test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add a
function with non-ASCII name for imenu tests.
lisp/progmodes/cperl-mode.el
test/lisp/progmodes/cperl-mode-resources/grammar.pl
test/lisp/progmodes/cperl-mode-tests.el