[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/php-mode 0902894e21 4/9: Add php-mode-replace-flymake-diag
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/php-mode 0902894e21 4/9: Add php-mode-replace-flymake-diag-function |
Date: |
Sat, 5 Nov 2022 19:59:06 -0400 (EDT) |
branch: elpa/php-mode
commit 0902894e21663d6e184a46e8f9defd633498b905
Author: USAMI Kenta <tadsan@zonu.me>
Commit: USAMI Kenta <tadsan@zonu.me>
Add php-mode-replace-flymake-diag-function
---
CHANGELOG.md | 1 +
lisp/php-mode.el | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e19a36d1c..53d308ec65 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ All notable changes of the PHP Mode 1.19.1 release series are
documented in this
* Psalm: [Atomic Type
Reference](https://psalm.dev/docs/annotating_code/type_syntax/atomic_types/)
* Psalm: [Supported
Annotations](https://psalm.dev/docs/annotating_code/supported_annotations/)
* Psalm: [Template
Annotations](https://psalm.dev/docs/annotating_code/templated_annotations/)
+ * Add `php-mode-replace-flymake-diag-function` custom variable and default
activated it ([#718])
### Changed
diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index 2f898403e1..b4088d2f89 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -82,6 +82,7 @@
(require 'rx)
(require 'cl-lib)
(require 'flymake)
+ (require 'php-flymake)
(require 'regexp-opt)
(defvar add-log-current-defun-header-regexp)
(defvar add-log-current-defun-function)
@@ -180,6 +181,15 @@ Turning this on will open it whenever `php-mode' is
loaded."
:tag "PHP Mode Page Delimiter"
:type 'regexp)
+(defcustom php-mode-replace-flymake-diag-function
+ (eval-when-compile (when (boundp 'flymake-diagnostic-functions)
+ #'php-flymake))
+ "Flymake function to replace, if NIL do not replace."
+ :group 'php-mode
+ :tag "PHP Mode Replace Flymake Diag Function"
+ :type '(choice 'function
+ (const :tag "Disable to replace" nil)))
+
(define-obsolete-variable-alias 'php-do-not-use-semantic-imenu
'php-mode-do-not-use-semantic-imenu "1.20.0")
(defcustom php-mode-do-not-use-semantic-imenu t
"Customize `imenu-create-index-function' for `php-mode'.
@@ -1262,6 +1272,10 @@ After setting the stylevars run hooks according to
STYLENAME
(setq-local add-log-current-defun-function nil)
(setq-local add-log-current-defun-header-regexp
php-beginning-of-defun-regexp)
+ (when (and (eval-when-compile (boundp 'flymake-diagnostic-functions))
+ php-mode-replace-flymake-diag-function)
+ (add-hook 'flymake-diagnostic-functions
php-mode-replace-flymake-diag-function nil t))
+
(when (fboundp 'c-looking-at-or-maybe-in-bracelist)
(advice-add #'c-looking-at-or-maybe-in-bracelist
:override 'php-c-looking-at-or-maybe-in-bracelist '(local)))
- [nongnu] elpa/php-mode updated (f5c4016bb6 -> 2bc4db007c), ELPA Syncer, 2022/11/05
- [nongnu] elpa/php-mode 683211c088 2/9: Remove 'flymake-cc from flymake-diagnostic-functions, ELPA Syncer, 2022/11/05
- [nongnu] elpa/php-mode dc67eaecf1 3/9: Add php-flymake.el, ELPA Syncer, 2022/11/05
- [nongnu] elpa/php-mode a8a62f39ed 6/9: Make append to flymake-allowed-file-name-masks only in legacy, ELPA Syncer, 2022/11/05
- [nongnu] elpa/php-mode 56e5b67c06 7/9: Merge pull request #718 from emacs-php/feature/flymake-diagnostic-functions, ELPA Syncer, 2022/11/05
- [nongnu] elpa/php-mode 2bc4db007c 9/9: Merge pull request #719 from emacs-php/feature/always-disable-c-auto-align-backslashe, ELPA Syncer, 2022/11/05
- [nongnu] elpa/php-mode 0902894e21 4/9: Add php-mode-replace-flymake-diag-function,
ELPA Syncer <=
- [nongnu] elpa/php-mode 330070dc01 5/9: Fix php-flymake-php-init for legacy flymake, ELPA Syncer, 2022/11/05
- [nongnu] elpa/php-mode 0260bd288a 1/9: Make obsolete php-mode-disable-c-mode-hook variable, ELPA Syncer, 2022/11/05
- [nongnu] elpa/php-mode 7bcc9d64e9 8/9: Remove php-mode-disable-c-auto-align-backslashes and always disabled, ELPA Syncer, 2022/11/05