branch: elpa/drupal-mode
commit 3bb1e40acc5d05c5ff51998b94bb35ef1c03f0ab
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>
Silence byte compiler.
---
drupal-mode.el | 4 ++--
drupal/flycheck.el | 7 +++----
drupal/flymake-phpcs.el | 6 +++++-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index d74620b5a9..bd9d5582f1 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -36,8 +36,8 @@
(require 'php-mode)
(require 'format-spec)
-(eval-when-compile
- (require 'css-mode))
+;; Silence byte compiler.
+(defvar css-indent-level)
diff --git a/drupal/flycheck.el b/drupal/flycheck.el
index d671587aef..84d5da1a46 100644
--- a/drupal/flycheck.el
+++ b/drupal/flycheck.el
@@ -25,9 +25,7 @@
;;; Code:
-(eval-when-compile
- (require 'flycheck))
-
+(require 'flycheck)
(require 'drupal/phpcs)
(defcustom drupal/flycheck-phpcs-js-and-css t
@@ -47,7 +45,8 @@
;; Flycheck will also highlight trailing whitespace as an
;; error so no need to highlight it twice.
- (drupal/phpcs-dont-show-trailing-whitespace)))
+ (when (fboundp 'drupal/phpcs-dont-show-trailing-whitespace)
+ (drupal/phpcs-dont-show-trailing-whitespace))))
(add-hook 'drupal-mode-hook #'drupal/flycheck-hook)
diff --git a/drupal/flymake-phpcs.el b/drupal/flymake-phpcs.el
index 65bb429b89..1ccc3932a9 100644
--- a/drupal/flymake-phpcs.el
+++ b/drupal/flymake-phpcs.el
@@ -32,6 +32,9 @@
(define-obsolete-variable-alias
'drupal/flymake-phpcs-dont-show-trailing-whitespace
'drupal/phpcs-dont-show-trailing-whitespace)
(require 'drupal/phpcs)
+;; Silence byte compiler.
+(defvar flymake-phpcs-location)
+
;; Only available when `flymake' is the fork from
;; https://github.com/illusori/emacs-flymake.
(when (or (boundp 'flymake-run-in-place)
@@ -76,7 +79,8 @@ file (and thus on the remote machine), or in the same place as
;; Flymake-phpcs will also highlight trailing whitespace as an
;; error so no need to highlight it twice.
- (drupal/phpcs-dont-show-trailing-whitespace)
+ (when (fboundp 'drupal/phpcs-dont-show-trailing-whitespace)
+ (drupal/phpcs-dont-show-trailing-whitespace))
;; This is a php-mode file so add the extension to a buffer locale
;; version of `flymake-allowed-file-name-masks' and make