perl-mode.el: Eliminate keywords which are not in Perl.
authorHarald Jörg <haj@posteo.de>
Thu, 28 Jan 2021 03:22:21 +0000 (04:22 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 28 Jan 2021 03:22:21 +0000 (04:22 +0100)
* lisp/progmodes/perl-mode.el (perl-imenu-generic-expression):
Remove keywords which are not part of Perl.
(perl-font-lock-keywords-2): Remove keywords which are not part of
Perl (bug#46024).  (These keywords are part of Raku; aka. Perl 6.)

lisp/progmodes/perl-mode.el

index d047dd543c257d9b47be085593961428bd8224ac..0120e4a7cd1f42060d506d0dcd53c29909bdfcf9 100644 (file)
   '(;; Functions
     (nil "^[ \t]*sub\\s-+\\([-[:alnum:]+_:]+\\)" 1)
     ;;Variables
-    ("Variables" "^[ \t]*\\(?:anon\\|argument\\|has\\|local\\|my\\|our\\|state\\|supersede\\)\\s-+\\([$@%][-[:alnum:]+_:]+\\)\\s-*=" 1)
+    ("Variables" "^[ \t]*\\(?:has\\|local\\|my\\|our\\|state\\)\\s-+\\([$@%][-[:alnum:]+_:]+\\)\\s-*=" 1)
     ("Packages" "^[ \t]*package\\s-+\\([-[:alnum:]+_:]+\\);" 1)
     ("Doc sections" "^=head[0-9][ \t]+\\(.*\\)" 1))
   "Imenu generic expression for Perl mode.  See `imenu-generic-expression'.")
               "\\>")
      ;;
      ;; Fontify declarators and prefixes as types.
-     ("\\<\\(anon\\|argument\\|has\\|local\\|my\\|our\\|state\\|supersede\\)\\>" . font-lock-type-face) ; declarators
-     ("\\<\\(let\\|temp\\)\\>" . font-lock-type-face) ; prefixes
-     ;;
+     ("\\<\\(has\\|local\\|my\\|our\\|state\\)\\>" . font-lock-type-face) ; declarators
+          ;;
      ;; Fontify function, variable and file name references.
      ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face)
      ;; Additionally fontify non-scalar variables.  `perl-non-scalar-variable'