diff options
| author | Stefan Monnier | 2012-11-08 10:37:29 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2012-11-08 10:37:29 -0500 |
| commit | a81ad2255cff7df04b38be476f500bdc454e38f0 (patch) | |
| tree | 6f606229be5dbd28872c8965ad3f7a8318970768 | |
| parent | 79b3e3765638652130d01dc083fdbfa2efc0092c (diff) | |
| download | emacs-a81ad2255cff7df04b38be476f500bdc454e38f0.tar.gz emacs-a81ad2255cff7df04b38be476f500bdc454e38f0.zip | |
* perl-mode.el: Add coding cookie.
| -rw-r--r-- | lisp/progmodes/perl-mode.el | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index aa8f6b71249..d2f7fc7a059 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; perl-mode.el --- Perl code editing commands for GNU Emacs | 1 | ;;; perl-mode.el --- Perl code editing commands for GNU Emacs -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -102,11 +102,6 @@ | |||
| 102 | 102 | ||
| 103 | ;;; Code: | 103 | ;;; Code: |
| 104 | 104 | ||
| 105 | |||
| 106 | (defvar font-lock-comment-face) | ||
| 107 | (defvar font-lock-doc-face) | ||
| 108 | (defvar font-lock-string-face) | ||
| 109 | |||
| 110 | (defgroup perl nil | 105 | (defgroup perl nil |
| 111 | "Major mode for editing Perl code." | 106 | "Major mode for editing Perl code." |
| 112 | :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) | 107 | :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) |
| @@ -227,24 +222,24 @@ Regexp match data 0 points to the chars." | |||
| 227 | perl-font-lock-keywords-1 | 222 | perl-font-lock-keywords-1 |
| 228 | `( ;; Fontify keywords, except those fontified otherwise. | 223 | `( ;; Fontify keywords, except those fontified otherwise. |
| 229 | ,(concat "\\<" | 224 | ,(concat "\\<" |
| 230 | (regexp-opt '("if" "until" "while" "elsif" "else" "unless" | 225 | (regexp-opt '("if" "until" "while" "elsif" "else" "unless" |
| 231 | "do" "dump" "for" "foreach" "exit" "die" | 226 | "do" "dump" "for" "foreach" "exit" "die" |
| 232 | "BEGIN" "END" "return" "exec" "eval") t) | 227 | "BEGIN" "END" "return" "exec" "eval") t) |
| 233 | "\\>") | 228 | "\\>") |
| 234 | ;; | 229 | ;; |
| 235 | ;; Fontify local and my keywords as types. | 230 | ;; Fontify local and my keywords as types. |
| 236 | ("\\<\\(local\\|my\\)\\>" . font-lock-type-face) | 231 | ("\\<\\(local\\|my\\)\\>" . font-lock-type-face) |
| 237 | ;; | 232 | ;; |
| 238 | ;; Fontify function, variable and file name references. | 233 | ;; Fontify function, variable and file name references. |
| 239 | ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face) | 234 | ("&\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-function-name-face) |
| 240 | ;; Additionally underline non-scalar variables. Maybe this is a bad idea. | 235 | ;; Additionally underline non-scalar variables. Maybe this is a bad idea. |
| 241 | ;;'("[$@%*][#{]?\\(\\sw+\\)" 1 font-lock-variable-name-face) | 236 | ;;'("[$@%*][#{]?\\(\\sw+\\)" 1 font-lock-variable-name-face) |
| 242 | ("[$*]{?\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-variable-name-face) | 237 | ("[$*]{?\\(\\sw+\\(::\\sw+\\)*\\)" 1 font-lock-variable-name-face) |
| 243 | ("\\([@%]\\|\\$#\\)\\(\\sw+\\(::\\sw+\\)*\\)" | 238 | ("\\([@%]\\|\\$#\\)\\(\\sw+\\(::\\sw+\\)*\\)" |
| 244 | (2 (cons font-lock-variable-name-face '(underline)))) | 239 | (2 (cons font-lock-variable-name-face '(underline)))) |
| 245 | ("<\\(\\sw+\\)>" 1 font-lock-constant-face) | 240 | ("<\\(\\sw+\\)>" 1 font-lock-constant-face) |
| 246 | ;; | 241 | ;; |
| 247 | ;; Fontify keywords with/and labels as we do in `c++-font-lock-keywords'. | 242 | ;; Fontify keywords with/and labels as we do in `c++-font-lock-keywords'. |
| 248 | ("\\<\\(continue\\|goto\\|last\\|next\\|redo\\)\\>[ \t]*\\(\\sw+\\)?" | 243 | ("\\<\\(continue\\|goto\\|last\\|next\\|redo\\)\\>[ \t]*\\(\\sw+\\)?" |
| 249 | (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) | 244 | (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) |
| 250 | ("^[ \t]*\\(\\sw+\\)[ \t]*:[^:]" 1 font-lock-constant-face) | 245 | ("^[ \t]*\\(\\sw+\\)[ \t]*:[^:]" 1 font-lock-constant-face) |