From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: Re: how to highlight block end in Python-mode indentation Date: Sun, 21 May 2017 07:40:57 -0500 Message-ID: References: <2d520b33-249a-f112-8ab6-1b89c3c76512@openmailbox.org> <87vaowhcyw.fsf@debian.tompa.tv> <5a1d5274-26ae-9036-956b-39c3d2d6d35e@openmailbox.org> <6624ae5f-ff47-ebd4-2c0f-871c9845d29b@openmailbox.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1495370495 28955 195.159.176.226 (21 May 2017 12:41:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 May 2017 12:41:35 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Krishnakant Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 21 14:41:31 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCQAq-0007OP-To for geh-help-gnu-emacs@m.gmane.org; Sun, 21 May 2017 14:41:29 +0200 Original-Received: from localhost ([::1]:37879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCQAw-0005IG-C7 for geh-help-gnu-emacs@m.gmane.org; Sun, 21 May 2017 08:41:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCQAO-0005Hr-Ez for help-gnu-emacs@gnu.org; Sun, 21 May 2017 08:41:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCQAN-0000rL-DI for help-gnu-emacs@gnu.org; Sun, 21 May 2017 08:41:00 -0400 Original-Received: from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f]:35838) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCQAN-0000rD-7g for help-gnu-emacs@gnu.org; Sun, 21 May 2017 08:40:59 -0400 Original-Received: by mail-it0-x22f.google.com with SMTP id c15so139059221ith.0 for ; Sun, 21 May 2017 05:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IJDDLQCmemI7VmLuwWKG5/8Z5u0LBuBlrrlxpRi7yHA=; b=ZD4NoUnHOfeqElLbanbD+VmWkrqO4QMd4rFf568i030L3pvYFdGvMFVH/Z8sQ8EHdU CspQFvUUJhnJzRD8AeJaj2elVEWZqQiSZVVZuMW4blroIJmE9AgaZgcCZhbe/EiX/wKF 3BQ1Y9RIB+Z9YW1huKCadPnyc2/Z67Oo0K4YSfYj6qZxRrK3wfI/aefR/djs+/ZLubnI co13m85zBBfg/wYXB8PNv15C/mtf7b2mRb52MNphsUsls6pPlJMh73WRaurucPEFqvmg jRjc1NFQvPU68mkbT75DHcBFIQJcbuMYP0kPQfxSpxvSkklmS9MAqDPpgZcto61Mg9zg JosA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IJDDLQCmemI7VmLuwWKG5/8Z5u0LBuBlrrlxpRi7yHA=; b=Bvgbf2gBYdDjRGE7ZB2UC+Fwip1fim+q9aj9ZZGo+wamahFkpzVRpqf1r303V0tMUk 708OQyQcr7474N25iXXI5C5gLgMiWyU4YTbHpLQWi3MwQX+kJwCBgClycad80g+BtK/M ZWJILMiXBWs/UI0gxgZTZFnUVpQyg27qMAO0zhRsV/KoOiUCqfoo9oCQcu/JJdlt8R+Y 1sqMKZTX1PAPLOPn+mMmlItTWR0d00h1o7WGyLReTbzCfMuAJnok75U6ufrz+LOgzs66 YnkB+jBuuNr0h0B1+e+Y2WfvPw++WiwpjBIiZTr69QYXXnm0L61hEyORX33QoR8ysKRc m4Fg== X-Gm-Message-State: AODbwcAcK73/pczha9Lpol05fXqe4dE8shzsWY1U0VPNW+wUAORmbOe7 ZyjSfDEULpnP+yv53j7fZc/lIFhjVO3k X-Received: by 10.36.249.72 with SMTP id l69mr18041877ith.119.1495370458469; Sun, 21 May 2017 05:40:58 -0700 (PDT) Original-Received: by 10.107.149.129 with HTTP; Sun, 21 May 2017 05:40:57 -0700 (PDT) Original-Received: by 10.107.149.129 with HTTP; Sun, 21 May 2017 05:40:57 -0700 (PDT) In-Reply-To: <6624ae5f-ff47-ebd4-2c0f-871c9845d29b@openmailbox.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::22f X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:113105 Archived-At: Do you have some solution? I think Yuri summarized the places to start quite well. In general, it sounds like a fair amount of code refactoring is in order. I would caution against trying to do it all at once, however. Assuming you have unit tests or even just some regression tests you can run, make sure everything passes, do a little refactoring, verify your tests still pass (and that they exercise the modified code - if not, write more test cases), check in the changes, then it's a process of lather, rinse, repeat. One mistake I make repeatedly, is mixing changes in a commit. Suppose I want to refactor a chunk of code into a separate function. While doing that, I notice something unrelated which needs doing too, and do that. Now my next commit mixes two functional changes to the code base, making it difficult to back out just one of them later. Small, precise commits are preferable to big, rambling commits. Such problematic commits are more tempting to make when you know you have a fair amount of work to do. Sorry, this is off-topic from your original request. Hopefully these few posts give you a bit different way to think about the problem you face. Skip Montanaro