1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
|
;;; php-face.el --- Face definitions for PHP script -*- lexical-binding: t; -*-
;; Copyright (C) 2023 Friends of Emacs-PHP development
;; Author: USAMI Kenta <tadsan@zonu.me>
;; Created: 5 May 2019
;; Version: 1.26.1
;; Keywords: faces, php
;; Homepage: https://github.com/emacs-php/php-mode
;; License: GPL-3.0-or-later
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; Face definitions for PHP script.
;;; Code:
;;;###autoload
(defgroup php-faces nil
"Faces used in PHP Mode."
:tag "PHP Faces"
:group 'php-mode
:group 'faces)
(defface php-string '((t (:inherit font-lock-string-face)))
"PHP Mode face used to highlight string literals."
:group 'php-faces
:tag "PHP String")
(defface php-keyword '((t (:inherit font-lock-keyword-face)))
"PHP Mode face used to highlight keywords."
:group 'php-faces
:tag "PHP Keyword")
(defface php-builtin '((t (:inherit font-lock-builtin-face)))
"PHP Mode face used to highlight builtins."
:group 'php-faces
:tag "PHP Built-in")
(defface php-function-name '((t (:inherit font-lock-function-name-face)))
"PHP Mode face used to highlight function names."
:group 'php-faces
:tag "PHP Function Name")
(defface php-function-call-standard `((t ,(when (eval-when-compile (get 'font-lock-function-call-face 'face-defface-spec))
'(:inherit font-lock-function-call-face))))
"PHP Mode face used to highlight function names in calles."
:group 'php-faces
:tag "PHP Function Call Standard")
(defface php-function-call-traditional '((t ()))
"PHP Mode face used to highlight function names in calles."
:group 'php-faces
:tag "PHP Function Call Traditional")
(define-obsolete-face-alias 'php-function-call 'php-function-call-traditional "1.26.0")
(defface php-method-call-standard '((t (:inherit php-function-call-standard)))
"PHP Mode face used to highlight method names in calles."
:group 'php-faces
:tag "PHP Method Call Standard")
(defface php-method-call-traditional '((t (:inherit php-function-call-traditional)))
"PHP Mode face used to highlight method names in calles."
:group 'php-faces
:tag "PHP Method Call Traditional")
(define-obsolete-face-alias 'php-method-call 'php-method-call-traditional "1.26.0")
(defface php-static-method-call-standard '((t (:inherit php-method-call-standard)))
"PHP Mode face used to highlight static method names in calles."
:group 'php-faces
:tag "PHP Static Method Call Standard")
(defface php-static-method-call-traditional '((t (:inherit php-method-call-traditional)))
"PHP Mode face used to highlight static method names in calles."
:group 'php-faces
:tag "PHP Static Method Call Traditional")
(define-obsolete-face-alias 'php-static-method-call 'php-static-method-call-traditional "1.26.0")
(defface php-variable-name '((t (:inherit font-lock-variable-name-face)))
"PHP Mode face used to highlight variable names."
:group 'php-faces
:tag "PHP Variable Name")
(defface php-property-name '((t (:inherit php-variable-name)))
"PHP Mode face used to highlight property names."
:group 'php-faces
:tag "PHP Property Name")
(defface php-variable-sigil '((t ()))
"PHP Mode face used to highlight variable sigils ($)."
:group 'php-faces
:tag "PHP Variable Sigil")
(defface php-operator '((t ()))
"PHP Mode face used to operators."
:group 'php-faces
:tag "PHP Operator")
(defface php-assignment-op '((t (:inherit php-operator)))
"PHP Mode face used to assignment operators (=, +=, ...)."
:group 'php-faces
:tag "PHP Object Op")
(defface php-comparison-op '((t (:inherit php-operator)))
"PHP Mode face used to comparison operators (==, !=, ===, ...)."
:group 'php-faces
:tag "PHP Comparison Op")
(defface php-logical-op '((t (:inherit php-operator)))
"PHP Mode face used to logical operators (&&, ||, ?:)."
:group 'php-faces
:tag "PHP Logical Op")
(defface php-arithmetic-op '((t (:inherit php-operator)))
"PHP Mode face used to arithmetic operators (+, -, %, ...)."
:group 'php-faces
:tag "PHP Arithmetic Op")
(defface php-inc-dec-op '((t (:inherit php-operator)))
"PHP Mode face used to increment and decremt operators (--, ++)."
:group 'php-faces
:tag "PHP Increment/Decrement Op")
(defface php-string-op '((t (:inherit php-operator)))
"PHP Mode face used to logical operators (.)."
:group 'php-faces
:tag "PHP String Op")
(defface php-object-op '((t (:inherit php-operator)))
"PHP Mode face used to object operators (->)."
:group 'php-faces
:tag "PHP Object Op")
(defface php-paamayim-nekudotayim '((t ()))
"PHP Mode face used to highlight scope resolution operators (::).
The operator is also knows as \"Paamayim Nekudotayim\"."
:group 'php-faces
:tag "PHP Paamayim Nekudotayim")
(defface php-type '((t (:inherit font-lock-type-face)))
"PHP Mode face used to highlight types."
:group 'php-faces
:tag "PHP Type")
(defface php-class '((t (:inherit font-lock-type-face)))
"PHP Mode face used to highlight class."
:group 'php-faces
:tag "PHP Class")
(defface php-constant '((t (:inherit font-lock-constant-face)))
"PHP Mode face used to highlight constants."
:group 'php-faces
:tag "PHP Constant")
(defface php-constant-assign '((t (:inherit php-constant)))
"PHP Mode face used to highlight constant assigning (\"const\" statement)."
:group 'php-faces
:tag "PHP Constant Assign")
(defface php-magical-constant '((t (:inherit font-lock-builtin-face)))
"PHP Mode face used to highlight magical constants."
:group 'php-faces
:tag "PHP Magical Constant")
(defface php-this '((t (:inherit php-constant)))
"PHP Mode face used to highlight $this variables."
:group 'php-faces
:tag "PHP $this")
(defface php-this-sigil '((t (:inherit php-constant)))
"PHP Mode face used to highlight sigils($) of $this variable."
:group 'php-faces
:tag "PHP $this Sigil")
(define-obsolete-face-alias 'php-$this 'php-this "1.26.0")
(define-obsolete-face-alias 'php-$this-sigil 'php-this-sigil "1.26.0")
(defface php-errorcontrol-op '((t (:inherit font-lock-type-face)))
"PHP Mode face used to highlight errorcontrol operators (@).."
:group 'php-faces
:tag "PHP ErrorControl Op")
(defface php-php-tag '((t (:inherit font-lock-preprocessor-face)))
"PHP Mode face used to highlight PHP tags."
:group 'php-faces
:tag "PHP php Tag")
(defface php-doc-annotation-tag (eval-when-compile
(if (eval-when-compile (boundp 'font-lock-doc-markup-face))
'((t . (:inherit font-lock-doc-markup-face)))
'((t . (:inherit font-lock-constant-face)))))
"Face used to highlight annotation tags in doc-comment."
:group 'php-faces
:tag "PHPDoc Annotation Tag")
(defface php-doc-variable-sigil '((t (:inherit font-lock-variable-name-face)))
"PHP Mode face used to highlight variable sigils($)."
:group 'php-faces
:tag "PHPDoc Variable Sigil")
(defface php-doc-$this '((t (:inherit php-type)))
"PHP Mode face used to highlight $this variable in doc-comment."
:group 'php-faces
:tag "PHPDoc $this")
(defface php-doc-$this-sigil '((t (:inherit php-type)))
"PHP Mode face used to highlight sigil of $this variable in doc-comment."
:group 'php-faces
:tag "PHPDoc $this Sigil")
(defface php-doc-class-name '((t (:inherit php-string)))
"PHP Mode Face used to class names in doc-comment."
:group 'php-faces
:tag "PHPDoc Class Name")
(defface php-class-declaration '((t (:inherit php-keyword)))
"PHP Mode Face used to class declarations."
:group 'php-faces
:tag "PHP Class Declaration")
(defface php-class-declaration-spec '((t (:inherit php-keyword)))
"PHP Mode Face used to highlight class declaration specification keywords.
The keywords include: implements, extends."
:group 'php-faces
:tag "PHP Class Declaration Specification")
(defface php-namespace-declaration '((t (:inherit php-keyword)))
"PHP Mode Face used to highlight namespace declaration keyword."
:group 'php-faces
:tag "PHP Namespace Declaration")
(defface php-import-declaration '((t (:inherit php-keyword)))
"PHP Mode Face used to highlight import statements (use ... as ...)."
:group 'php-faces
:tag "PHP Import Statement")
(defface php-class-modifier '((t (:inherit php-keyword)))
"PHP Mode Face used to highlight class modifiers (final, abstract)."
:group 'php-faces
:tag "PHP Class Modifier")
(defface php-method-modifier '((t (:inherit php-keyword)))
"PHP Mode Face used to highlight method modifiers (final, abstract)."
:group 'php-faces
:tag "PHP Method Modifier")
(defface php-visibility-modifier '((t (:inherit php-keyword)))
"PHP Mode Face used to highlight access keywords (public, protected, private)."
:group 'php-faces
:tag "PHP Visibility Modifier")
(defface php-control-structure '((t (:inherit php-keyword)))
"PHP Mode Face used to highlight control structures.
The control structures include: if, foreach, while, switch, catch."
:group 'php-faces
:tag "PHP Control Structure")
(define-obsolete-face-alias 'php-annotations-annotation-face 'php-doc-annotation-tag "1.19.0")
(provide 'php-face)
;;; php-face.el ends here
|