branch: scratch/editorconfig-cc
commit 39ef110ef21c9b71610f0a3cc495237841002870
Author: 10sr <8.slas...@gmail.com>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

    Add fixes for compile warning
---
 editorconfig.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/editorconfig.el b/editorconfig.el
index f3f5b43d71..156e885521 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -587,10 +587,12 @@ any of regexps in `editorconfig-exclude-regexps'."
   "Function to run when major-mode has been changed."
   (display-warning '(editorconfig editorconfig-local-major-mode-hook)
                    (format "editorconfig-mode: %S -properties-hash: %S"
-                           editorconfig-mode
+                           (and (boundp 'editorconfig-mode)
+                                editorconfig-mode)
                            editorconfig-properties-hash)
                    :debug)
-  (when (and editorconfig-mode
+  (when (and (boundp 'editorconfig-mode)
+             editorconfig-mode
              editorconfig-properties-hash)
     (editorconfig-set-variables editorconfig-properties-hash)))
 

Reply via email to