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

    Fix compile warning of python-mode offset (#306)
---
 editorconfig.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/editorconfig.el b/editorconfig.el
index 4a02bb9c42..3b97999079 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -51,8 +51,7 @@
   (defvar tex-indent-basic)
   (defvar tex-indent-item)
   (defvar tex-indent-arg)
-  (defvar evil-shift-width)
-  (defvar python-indent-offset))
+  (defvar evil-shift-width))
 
 (require 'editorconfig-core)
 
@@ -367,7 +366,8 @@ Make a message by passing ARGS to `format-message'."
 
 (defun editorconfig-set-indentation-python-mode (size)
   "Set `python-mode' indent size to SIZE."
-  (setq-local python-indent-offset size)
+  (when (boundp 'python-indent-offset)
+    (setq-local python-indent-offset size))
   ;; For https://launchpad.net/python-mode
   (when (boundp 'py-indent-offset)
     (setq-local py-indent-offset size)))

Reply via email to