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

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

[nongnu] elpa/drupal-mode f4a4985134 132/308: Check if our checker can b


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode f4a4985134 132/308: Check if our checker can be used before enforcing it.
Date: Tue, 25 Jan 2022 10:59:38 -0500 (EST)

branch: elpa/drupal-mode
commit f4a49851342ba5098d81ae8ef7dd96653d23ca1b
Author: Thomas Fini Hansen <xen@xen.dk>
Commit: Thomas Fini Hansen <xen@xen.dk>

    Check if our checker can be used before enforcing it.
    
    The buffer could be in some derived mode that flycheck wont activate
    the checker for, which results in errors if we try to enforce it.
---
 drupal/flycheck.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drupal/flycheck.el b/drupal/flycheck.el
index 58aeab0272..5939fcf8cb 100644
--- a/drupal/flycheck.el
+++ b/drupal/flycheck.el
@@ -53,7 +53,9 @@ so no need to highlight it twice."
     (set (make-local-variable 'flycheck-phpcs-standard) drupal/phpcs-standard)
 
     (when drupal/flycheck-phpcs-js-and-css
-      (if (apply 'derived-mode-p (append drupal-css-modes drupal-js-modes))
+      (if (and (apply 'derived-mode-p (append drupal-css-modes 
drupal-js-modes))
+               (flycheck-may-use-checker 'css-js-phpcs)
+               )
           (set (make-local-variable 'flycheck-checker) 'css-js-phpcs)
         )
       )



reply via email to

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