From dcc4364e3e34976495d57e4b118c4d106fd88ae8 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Wed, 24 Sep 2014 11:29:38 +0200 Subject: [PATCH] Emacs: proper workaroud for python and guess-style conflict --- .emacs.d/init.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index e7082875..68da81aa 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -112,13 +112,15 @@ Example: to assign some-function to C-i, use (autoload 'guess-style-guess-all "guess-style" nil t) (setq guess-style-info-mode 1) ;; TODO: guess-style has some variable/alias conflict with Python mode. -;; Workaround: Remove 'python' from guess list. +;; Workaround: use `python-indent-offset` instead of the deprecated +;; `python-indent`. (setq guess-style-guesser-alist '((indent-tabs-mode . guess-style-guess-tabs-mode) (tab-width . guess-style-guess-tab-width) (c-basic-offset . guess-style-guess-c-basic-offset) (nxml-child-indent . guess-style-guess-indent) - (css-indent-offset . guess-style-guess-indent))) + (css-indent-offset . guess-style-guess-indent) + (python-indent-offset . guess-style-guess-indent))) (add-hook 'prog-mode-hook (lambda () (ignore-errors (guess-style-guess-all)))) (autoload 'pdf-view "tool-pdf" nil t)