File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ All notable changes of the PHP Mode 1.19.1 release series are documented in this
17
17
* Psalm: [ Atomic Type Reference] ( https://psalm.dev/docs/annotating_code/type_syntax/atomic_types/ )
18
18
* Psalm: [ Supported Annotations] ( https://psalm.dev/docs/annotating_code/supported_annotations/ )
19
19
* Psalm: [ Template Annotations] ( https://psalm.dev/docs/annotating_code/templated_annotations/ )
20
+ * Add ` php-mode-replace-flymake-diag-function ` custom variable and default activated it ([ #718 ] )
20
21
21
22
### Changed
22
23
Original file line number Diff line number Diff line change 82
82
(require 'rx )
83
83
(require 'cl-lib )
84
84
(require 'flymake )
85
+ (require 'php-flymake )
85
86
(require 'regexp-opt )
86
87
(defvar add-log-current-defun-header-regexp )
87
88
(defvar add-log-current-defun-function )
@@ -180,6 +181,15 @@ Turning this on will open it whenever `php-mode' is loaded."
180
181
:tag " PHP Mode Page Delimiter"
181
182
:type 'regexp )
182
183
184
+ (defcustom php-mode-replace-flymake-diag-function
185
+ (eval-when-compile (when (boundp 'flymake-diagnostic-functions )
186
+ #'php-flymake ))
187
+ " Flymake function to replace, if NIL do not replace."
188
+ :group 'php-mode
189
+ :tag " PHP Mode Replace Flymake Diag Function"
190
+ :type '(choice 'function
191
+ (const :tag " Disable to replace" nil )))
192
+
183
193
(define-obsolete-variable-alias 'php-do-not-use-semantic-imenu 'php-mode-do-not-use-semantic-imenu " 1.20.0" )
184
194
(defcustom php-mode-do-not-use-semantic-imenu t
185
195
" Customize `imenu-create-index-function' for `php-mode' .
@@ -1262,6 +1272,10 @@ After setting the stylevars run hooks according to STYLENAME
1262
1272
(setq-local add-log-current-defun-function nil )
1263
1273
(setq-local add-log-current-defun-header-regexp php-beginning-of-defun-regexp)
1264
1274
1275
+ (when (and (eval-when-compile (boundp 'flymake-diagnostic-functions ))
1276
+ php-mode-replace-flymake-diag-function)
1277
+ (add-hook 'flymake-diagnostic-functions php-mode-replace-flymake-diag-function nil t ))
1278
+
1265
1279
(when (fboundp 'c-looking-at-or-maybe-in-bracelist )
1266
1280
(advice-add #'c-looking-at-or-maybe-in-bracelist
1267
1281
:override 'php-c-looking-at-or-maybe-in-bracelist '(local)))
You can’t perform that action at this time.
0 commit comments