emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/drupal-mode 0a5c953312 029/308: flymake-phpcs will only be


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode 0a5c953312 029/308: flymake-phpcs will only be used in php-mode.
Date: Tue, 25 Jan 2022 10:59:04 -0500 (EST)

branch: elpa/drupal-mode
commit 0a5c95331258c00cfd1d4a254e0250d34acc7242
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>

    flymake-phpcs will only be used in php-mode.
---
 drupal/flymake-phpcs.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drupal/flymake-phpcs.el b/drupal/flymake-phpcs.el
index a0eec709bb..6eaee99b2d 100644
--- a/drupal/flymake-phpcs.el
+++ b/drupal/flymake-phpcs.el
@@ -8,13 +8,14 @@
 
 (defun drupal/flymake-phpcs-enable ()
   "Enable drupal-mode support for flymake-phpcs."
-  (when (and (executable-find flymake-phpcs-command)
-            (ignore-errors
-              (string-match
-               "Drupal"
-               (with-output-to-string
-                 (with-current-buffer standard-output
-                   (call-process (executable-find flymake-phpcs-command) nil 
(list t nil) nil "-i"))))))
+  (when (and (eq major-mode 'php-mode)
+             (executable-find flymake-phpcs-command)
+             (ignore-errors
+               (string-match
+                "Drupal"
+                (with-output-to-string
+                  (with-current-buffer standard-output
+                    (call-process (executable-find flymake-phpcs-command) nil 
(list t nil) nil "-i"))))))
     (set (make-local-variable 'flymake-phpcs-standard) "Drupal")
     ;; We have probably set `flymake-phpcs-standard' after a syntax
     ;; check was initiated - so kill it and start syntax check again.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]