From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: python-mode's broken indentation behavior Date: Mon, 29 Jun 2015 12:29:02 -0700 Message-ID: References: <87y4j37gzs.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1435606191 16820 80.91.229.3 (29 Jun 2015 19:29:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2015 19:29:51 +0000 (UTC) To: Florian Weimer , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 29 21:29:51 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z9ekY-0007RB-FQ for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jun 2015 21:29:50 +0200 Original-Received: from localhost ([::1]:43676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ekX-0002K7-Rm for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jun 2015 15:29:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ekB-0002GZ-8c for help-gnu-emacs@gnu.org; Mon, 29 Jun 2015 15:29:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9ekA-0005jP-9C for help-gnu-emacs@gnu.org; Mon, 29 Jun 2015 15:29:27 -0400 Original-Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:35630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ekA-0005ei-2h for help-gnu-emacs@gnu.org; Mon, 29 Jun 2015 15:29:26 -0400 Original-Received: by obbop1 with SMTP id op1so111603123obb.2 for ; Mon, 29 Jun 2015 12:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=BTfrWh8Q0F/7/WIE+Mk/lXR1j9oAivKS/InE271vZgY=; b=I9/PIJ9btTsCZWXt08G88yrO0bpSGRYlLmSqmO4ry/rcGAYpBK5MpPZYcL4l+N82HL e17dW6c+E46MeYDCKk+vE8jl2yGhIv5gwGYxNWy5GjSPqBQsIOB6Qld3iWlnYGOMd15p icrMoHuc/kywjDYD0F69SGLdfW18uXDL30z7vYBMBlbAbOCIFlt6qPGWj4LOr9vq2g0s a9ijWmuYx6ouRDJ2d1GKWuMHgGVN2/NQ09a8QIsaqBSETdPlUSrUz0ilYkP4joi7R9Ys DKJBEN3fRxI23f/32iE0zxNZT2UH1+keCTQxFcJ0e4Rri37msoCyhuRGB1P5CAhG4Nxh UfRQ== X-Received: by 10.202.55.7 with SMTP id e7mr14854238oia.56.1435606161391; Mon, 29 Jun 2015 12:29:21 -0700 (PDT) Original-Received: by 10.76.168.70 with HTTP; Mon, 29 Jun 2015 12:29:02 -0700 (PDT) In-Reply-To: <87y4j37gzs.fsf@mid.deneb.enyo.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::231 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105293 Archived-At: Florian Weimer 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