Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lisp/php-complete.el
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
:type (eval-when-compile `(set ,@(mapcar (lambda (elm) (list 'const (car elm)))
php-defs-functions-alist)))
:safe (lambda (value) (and (listp value) (cl-loop for v in values
always (assq v php-defs-functions-alist))))
:group 'php-complete)
always (assq v php-defs-functions-alist)))))

;;; Cape functions:

Expand Down
44 changes: 0 additions & 44 deletions lisp/php-face.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,238 +37,194 @@

(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")
Expand Down
1 change: 0 additions & 1 deletion lisp/php-flymake.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

(defcustom php-flymake-executable-command-args nil
"List of command and arguments for `php -l'."
:group 'php-flymake
:type '(repeat string)
:safe (lambda (v) (and (listp v) (cl-every v #'stringp))))

Expand Down
13 changes: 4 additions & 9 deletions lisp/php-format.el
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,13 @@
(const :tag "PHP-CS-Fixer" php-cs-fixer)
(const :tag "PHP Code Beautifier and Fixer" phpcbf)
(repeat :tag "Command and arguments" string))
:safe (lambda (v) (or (symbolp v) (listp v)))
:group 'php-format)
:safe (lambda (v) (or (symbolp v) (listp v))))

(defcustom php-format-command-dir "vendor/bin"
"A relative path to the directory where formatting tool is installed."
:tag "PHP Format Command"
:type 'string
:safe #'stringp
:group 'php-format)
:safe #'stringp)

(defcustom php-format-default-idle-time 3
"Number of seconds to wait idle before formatting."
Expand All @@ -126,14 +124,12 @@
"An alist of misplay the result method of the formatting process."
:tag "PHP Format Result Display Method"
:type '(alist :key-type function
:value-type symbol)
:group 'php-format)
:value-type symbol))

(defcustom php-format-disable-async-format-buffer-has-modified t
"When set to non-NIL, disables async formatting if buffer is modified (unsaved)."
:tag "PHP Format Disable Async Format Buffer Has Modified"
:type 'boolean
:group 'php-format)
:type 'boolean)

;; Internal functions
(defsubst php-format--register-timer (sec command-args)
Expand Down Expand Up @@ -226,7 +222,6 @@
;;;###autoload
(define-minor-mode php-format-auto-mode
"Automatically apply formatting when saving an edited file."
:group 'php-format
:lighter php-format-lighter
(if php-format-auto-mode
(add-hook 'after-save-hook 'php-format-on-after-save-hook php-format-auto-mode-hook-depth t)
Expand Down
3 changes: 1 addition & 2 deletions lisp/php-ide-phpactor.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
(const hover)
(const navigation))
:safe (lambda (xs) (and (listp xs)
(cl-every (lambda (x) (memq x '(all hover navigation))) xs)))
:group 'php-ide-phpactor)
(cl-every (lambda (x) (memq x '(all hover navigation))) xs))))

(defvar php-ide-phpactor-timer nil
"Timer object for execute Phpactor and display hover message.")
Expand Down
4 changes: 0 additions & 4 deletions lisp/php-ide.el
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
(defcustom php-ide-features nil
"A set of PHP-IDE features symbol."
:tag "PHP-IDE Feature"
:group 'php-ide
:type `(set ,@(mapcar (lambda (feature) (list 'const (car feature)))
php-ide-feature-alist)
symbol)
Expand All @@ -150,7 +149,6 @@
(defcustom php-ide-eglot-executable nil
"Command name or path to the command of Eglot LSP executable."
:tag "PHP-IDE Eglot Executable"
:group 'php-ide
:type '(choice
(const intelephense)
(const phpactor)
Expand All @@ -174,7 +172,6 @@
(defcustom php-ide-mode-lighter " PHP-IDE"
"A symbol of PHP-IDE feature."
:tag "PHP-IDE Mode Lighter"
:group 'php-ide
:type 'string
:safe #'stringp)

Expand All @@ -186,7 +183,6 @@ Notice that two arguments (FEATURE ACTIVATE) are given.
FEATURE: A symbol, like \\='lsp-mode.
ACTIVATE: T is given when activeting, NIL when deactivating PHP-IDE."
:tag "PHP-IDE Mode Functions"
:group 'php-ide
:type '(repeat function)
:safe (lambda (functions)
(and (listp functions) (cl-every #'functionp functions))))
Expand Down
2 changes: 0 additions & 2 deletions lisp/php-project.el
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,11 @@
(defcustom php-project-auto-detect-etags-file nil
"If `T', automatically detect etags file when file is opened."
:tag "PHP Project Auto Detect Etags File"
:group 'php-project
:type 'boolean)

(defcustom php-project-use-projectile-to-detect-root nil
"If `T' and projectile-mode is activated, use Projectile for root detection."
:tag "PHP Project Use Projectile To Detect Root"
:group 'php-project
:type 'boolean)

;; Variables
Expand Down
Loading
Loading