From 3d34a658b8fe8de791f65f97bce4cb19545faadf Mon Sep 17 00:00:00 2001 From: "E. Choroba" Date: Tue, 22 Dec 2020 20:44:24 +0100 Subject: [PATCH] cperl-mode: Correctly syntax highlight index/value array slices %array[0, 1] should use the array face, not the hash one. --- lisp/progmodes/cperl-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 87542ea133..2fc2d14ee6 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -5666,7 +5666,7 @@ indentation and initial hashes. Behaves usually outside of comment." 'cperl-hash-face 'cperl-array-face) nil) ; arrays and hashes - ("\\(\\([$@]+\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)[ \t]*\\([[{]\\)" + ("\\(\\([$@%]+\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)[ \t]*\\([[{]\\)" 1 (if (= (- (match-end 2) (match-beginning 2)) 1) (if (eq (char-after (match-beginning 3)) ?{) -- 2.26.2