help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python-mode's broken indentation behavior


From: John Mastro
Subject: Re: python-mode's broken indentation behavior
Date: Mon, 29 Jun 2015 12:29:02 -0700

Florian Weimer <fw@deneb.enyo.de> wrote:
> Indentation in python-mode has been fairly broken for me, I believe
> since Emacs 24.  The electric colon makes this especially annoying.

I find the indentation engine to be quite good overall, but use
something like the following to prevent the colon issue:

(defun no-electric-colon ()
  (setq-local electric-indent-chars (remq ?: electric-indent-chars)))

(with-eval-after-load 'python
  (add-hook 'python-mode-hook #'no-electric-colon))

Hope that helps

-- 
john



reply via email to

[Prev in Thread] Current Thread [Next in Thread]