diff options
| author | Harald Jörg | 2025-01-13 12:24:40 +0100 |
|---|---|---|
| committer | Harald Jörg | 2025-01-13 12:24:40 +0100 |
| commit | b74ac4af9408230645f1edb56c410b7a80bb41d2 (patch) | |
| tree | 1870231f83a14e87e65d69cc5d44d96e2c784bd8 /test | |
| parent | d66b8d4becb6804d3bd912a000dc64ccfdbe6810 (diff) | |
| download | emacs-b74ac4af9408230645f1edb56c410b7a80bb41d2.tar.gz emacs-b74ac4af9408230645f1edb56c410b7a80bb41d2.zip | |
; cperl-mode.el: Allow bare $ in a signature (Bug#74245)
* lisp/progmodes/cperl-mode.el (cperl--signature-rx): Allow bare
sigils for unused parameters in signatures.
(cperl-find-pods-heres): Avoid $) at the end of a signature being
treated as the punctuation variable $) by treating this dollar as
punctuation
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-signature-rx): Add ($first,$) as a valid signature,
remove ($) from the list of invalid signatures.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/cperl-mode-tests.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 1f3c0ca3213..958ffe38a8b 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el | |||
| @@ -622,10 +622,9 @@ Also includes valid cases with whitespace in strange places." | |||
| 622 | "Test subroutine signatures." | 622 | "Test subroutine signatures." |
| 623 | (skip-unless (eq cperl-test-mode #'cperl-mode)) | 623 | (skip-unless (eq cperl-test-mode #'cperl-mode)) |
| 624 | (let ((valid | 624 | (let ((valid |
| 625 | '("()" "( )" "($self, %params)" "(@params)")) | 625 | '("()" "( )" "($self, %params)" "(@params)" "($first,$)")) |
| 626 | (invalid | 626 | (invalid |
| 627 | '("$self" ; missing paren | 627 | '("$self" ; missing paren |
| 628 | "($)" ; a subroutine signature | ||
| 629 | "($!)" ; globals not permitted in a signature | 628 | "($!)" ; globals not permitted in a signature |
| 630 | "(@par,%options)" ; two slurpy parameters | 629 | "(@par,%options)" ; two slurpy parameters |
| 631 | "{$self}"))) ; wrong type of paren | 630 | "{$self}"))) ; wrong type of paren |