From: Noam Postavsky <npostavs@gmail.com> Date: Tue, 20 Mar 2018 23:18:33 +0000 (-0400) Subject: Revert "Support all perl variable declarators and prefixes" X-Git-Tag: emacs-26.1-rc1~69 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f8cad16bb3272a8069b3008019f9d18516aef1a5;p=emacs.git Revert "Support all perl variable declarators and prefixes" It highlights normal variable names in perl programs (Bug#30812). * lisp/progmodes/perl-mode.el (perl-imenu-generic-expression) (perl-font-lock-keywords-2): Restore values prior to Bug#27613 fix. Don't merge to master, we will fix Bug#27613 properly there (it's too close to release to do that on emacs-26). --- diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 99480788f50..c9bfb1acdfe 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -135,7 +135,7 @@ '(;; Functions (nil "^[ \t]*sub\\s-+\\([-[:alnum:]+_:]+\\)" 1) ;;Variables - ("Variables" "^[ \t]*\\(?:anon\\|argument\\|has\\|local\\|my\\|our\\|state\\|supersede\\)\\s-+\\([$@%][-[:alnum:]+_:]+\\)\\s-*=" 1) + ("Variables" "^\\(?:my\\|our\\)\\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'.") @@ -179,9 +179,8 @@ "BEGIN" "END" "return" "exec" "eval") t) "\\>") ;; - ;; 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 + ;; Fontify local and my keywords as types. + ("\\<\\(local\\|my\\)\\>" . font-lock-type-face) ;; ;; Fontify function, variable and file name references. ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face)