mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
cperl-mode: Fix byte-compilation warnings
* lisp/progmodes/cperl-mode.el (defconst): Reformat docstring to fit into 80 columns. (cperl-find-sub-attrs): Mark lexical parameters as unused. * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-fontify-attrs-and-signatures): Fix use of `match-beginning' (perl-indent-parens-as-block): Define as a variable.
This commit is contained in:
parent
2195935870
commit
d42b45dcc7
2 changed files with 13 additions and 9 deletions
|
|
@ -184,11 +184,12 @@ attributes, prototypes and signatures."
|
|||
(when (match-beginning 2)
|
||||
(should (equal (get-text-property (match-beginning 2) 'face)
|
||||
'font-lock-string-face))))
|
||||
(goto-char end-of-sub)
|
||||
;; Subroutine signatures
|
||||
(goto-char start-of-sub)
|
||||
(when (search-forward "$bar" end-of-sub t)
|
||||
(should (equal (get-text-property (match-beginning) 'face)
|
||||
'font-lock-variable-name-face)))))
|
||||
(should (equal (get-text-property (match-beginning 0) 'face)
|
||||
'font-lock-variable-name-face)))
|
||||
(goto-char end-of-sub)))
|
||||
;; Anonymous subroutines
|
||||
(while (search-forward-regexp "= sub" nil t)
|
||||
(let ((start-of-sub (match-beginning 0))
|
||||
|
|
@ -205,11 +206,12 @@ attributes, prototypes and signatures."
|
|||
(when (match-beginning 2)
|
||||
(should (equal (get-text-property (match-beginning 2) 'face)
|
||||
'font-lock-string-face))))
|
||||
(goto-char end-of-sub)
|
||||
;; Subroutine signatures
|
||||
(goto-char start-of-sub)
|
||||
(when (search-forward "$bar" end-of-sub t)
|
||||
(should (equal (get-text-property (match-beginning) 'face)
|
||||
'font-lock-variable-name-face))))))))
|
||||
(should (equal (get-text-property (match-beginning 0) 'face)
|
||||
'font-lock-variable-name-face)))
|
||||
(goto-char end-of-sub))))))
|
||||
|
||||
(ert-deftest cperl-test-fontify-special-variables ()
|
||||
"Test fontification of variables like $^T or ${^ENCODING}.
|
||||
|
|
@ -314,6 +316,7 @@ issued by CPerl mode."
|
|||
|
||||
(defvar perl-continued-statement-offset)
|
||||
(defvar perl-indent-level)
|
||||
(defvar perl-indent-parens-as-block)
|
||||
|
||||
(defconst cperl--tests-heredoc-face
|
||||
(if (equal cperl-test-mode 'perl-mode) 'perl-heredoc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue