|
| 1 | +;;; php-face.el --- Face definitions for PHP script -*- lexical-binding: t; -*- |
| 2 | + |
| 3 | +;; Copyright (C) 2019 Friends of Emacs-PHP development |
| 4 | + |
| 5 | +;; Author: USAMI Kenta <tadsan@zonu.me> |
| 6 | +;; Created: 5 May 2019 |
| 7 | +;; Version: 1.21.2 |
| 8 | +;; Keywords: faces, php |
| 9 | +;; Homepage: https://github.com/emacs-php/php-mode |
| 10 | +;; Package-Requires: ((emacs "24.3")) |
| 11 | +;; License: GPL-3.0-or-later |
| 12 | + |
| 13 | +;; This program is free software; you can redistribute it and/or modify |
| 14 | +;; it under the terms of the GNU General Public License as published by |
| 15 | +;; the Free Software Foundation, either version 3 of the License, or |
| 16 | +;; (at your option) any later version. |
| 17 | + |
| 18 | +;; This program is distributed in the hope that it will be useful, |
| 19 | +;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | +;; GNU General Public License for more details. |
| 22 | + |
| 23 | +;; You should have received a copy of the GNU General Public License |
| 24 | +;; along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 25 | + |
| 26 | +;;; Commentary: |
| 27 | + |
| 28 | +;; Face definitions for PHP script. |
| 29 | + |
| 30 | +;;; Code: |
| 31 | + |
| 32 | +;;;###autoload |
| 33 | +(defgroup php-faces nil |
| 34 | + "Faces used in PHP Mode" |
| 35 | + :tag "PHP Faces" |
| 36 | + :group 'php-mode |
| 37 | + :group 'faces) |
| 38 | + |
| 39 | +(defface php-string '((t (:inherit font-lock-string-face))) |
| 40 | + "PHP Mode face used to highlight string literals." |
| 41 | + :group 'php-faces) |
| 42 | + |
| 43 | +(defface php-keyword '((t (:inherit font-lock-keyword-face))) |
| 44 | + "PHP Mode face used to highlight keywords." |
| 45 | + :group 'php-faces) |
| 46 | + |
| 47 | +(defface php-builtin '((t (:inherit font-lock-builtin-face))) |
| 48 | + "PHP Mode face used to highlight builtins." |
| 49 | + :group 'php-faces) |
| 50 | + |
| 51 | +(defface php-function-name '((t (:inherit font-lock-function-name-face))) |
| 52 | + "PHP Mode face used to highlight function names." |
| 53 | + :group 'php-faces) |
| 54 | + |
| 55 | +(defface php-function-call '((t (:inherit default))) |
| 56 | + "PHP Mode face used to highlight function names in calles." |
| 57 | + :group 'php-faces) |
| 58 | + |
| 59 | +(defface php-method-call '((t (:inherit php-function-call))) |
| 60 | + "PHP Mode face used to highlight method names in calles." |
| 61 | + :group 'php-faces) |
| 62 | + |
| 63 | +(defface php-static-method-call '((t (:inherit php-method-call))) |
| 64 | + "PHP Mode face used to highlight static method names in calles." |
| 65 | + :group 'php-faces) |
| 66 | + |
| 67 | +(defface php-variable-name '((t (:inherit font-lock-variable-name-face))) |
| 68 | + "PHP Mode face used to highlight variable names." |
| 69 | + :group 'php-faces) |
| 70 | + |
| 71 | +(defface php-property-name '((t (:inherit php-variable-name))) |
| 72 | + "PHP Mode face used to highlight property names." |
| 73 | + :group 'php-faces) |
| 74 | + |
| 75 | +(defface php-variable-sigil '((t (:inherit default))) |
| 76 | + "PHP Mode face used to highlight variable sigils ($)." |
| 77 | + :group 'php-faces) |
| 78 | + |
| 79 | +(defface php-object-op '((t (:inherit default))) |
| 80 | + "PHP Mode face used to object operators (->)." |
| 81 | + :group 'php-faces) |
| 82 | + |
| 83 | +(defface php-paamayim-nekudotayim '((t (:inherit default))) |
| 84 | + "PHP Mode face used to highlight \"Paamayim Nekudotayim\" scope resolution operators (::)." |
| 85 | + :group 'php-faces) |
| 86 | + |
| 87 | +(defface php-type '((t (:inherit font-lock-type-face))) |
| 88 | + "PHP Mode face used to highlight types." |
| 89 | + :group 'php-faces) |
| 90 | + |
| 91 | +(defface php-constant '((t (:inherit font-lock-constant-face))) |
| 92 | + "PHP Mode face used to highlight constants." |
| 93 | + :group 'php-faces) |
| 94 | + |
| 95 | +(defface php-$this '((t (:inherit php-constant))) |
| 96 | + "PHP Mode face used to highlight $this variables." |
| 97 | + :group 'php-faces) |
| 98 | + |
| 99 | +(defface php-$this-sigil '((t (:inherit php-constant))) |
| 100 | + "PHP Mode face used to highlight sigils($) of $this variable." |
| 101 | + :group 'php-faces) |
| 102 | + |
| 103 | +(defface php-php-tag '((t (:inherit font-lock-preprocessor-face))) |
| 104 | + "PHP Mode face used to highlight PHP tags." |
| 105 | + :group 'php-faces) |
| 106 | + |
| 107 | +(defface php-doc-annotation-tag '((t . (:inherit font-lock-constant-face))) |
| 108 | + "Face used to highlight annotation tags in doc-comment." |
| 109 | + :group 'php-faces) |
| 110 | + |
| 111 | +(defface php-doc-variable-sigil '((t (:inherit font-lock-variable-name-face))) |
| 112 | + "PHP Mode face used to highlight variable sigils($)." |
| 113 | + :group 'php-faces) |
| 114 | + |
| 115 | +(defface php-doc-$this '((t (:inherit php-type))) |
| 116 | + "PHP Mode face used to highlight $this variable in doc-comment." |
| 117 | + :group 'php-faces) |
| 118 | + |
| 119 | +(defface php-doc-$this-sigil '((t (:inherit php-type))) |
| 120 | + "PHP Mode face used to highlight sigil of $this variable in doc-comment." |
| 121 | + :group 'php-faces) |
| 122 | + |
| 123 | +(defface php-doc-class-name '((t (:inherit php-string))) |
| 124 | + "Face used to class names in doc-comment." |
| 125 | + :group 'php-faces) |
| 126 | + |
| 127 | +(define-obsolete-face-alias 'php-annotations-annotation-face 'php-doc-annotation-tag "1.19.0") |
| 128 | + |
| 129 | +(provide 'php-face) |
| 130 | +;;; php-face.el ends here |
0 commit comments