Skip to content

Commit

Permalink
Fix compile warning of python-mode offset (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
10sr authored May 19, 2023
1 parent f5fc0eb commit 10a77b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editorconfig.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -417,7 +416,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)))
Expand Down

0 comments on commit 10a77b4

Please sign in to comment.