From 281410de114726539ebf4c4661b662da143deca4 Mon Sep 17 00:00:00 2001 From: magia Date: Tue, 22 Nov 2016 13:02:08 +0800 Subject: [PATCH] Fix python-enable-yapf-format-on-save --- layers/+lang/python/packages.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layers/+lang/python/packages.el b/layers/+lang/python/packages.el index 55e5853c6..9b5c2c9a7 100644 --- a/layers/+lang/python/packages.el +++ b/layers/+lang/python/packages.el @@ -440,7 +440,9 @@ fix this issue." (defun python/init-yapfify () (use-package yapfify :defer t - :init (spacemacs/set-leader-keys-for-major-mode 'python-mode - "=" 'yapfify-buffer) - :config (when python-enable-yapf-format-on-save - (add-hook 'python-mode-hook 'yapf-mode)))) + :init + (progn + (spacemacs/set-leader-keys-for-major-mode 'python-mode + "=" 'yapfify-buffer) + (when python-enable-yapf-format-on-save + (add-hook 'python-mode-hook 'yapf-mode)))))