all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: 19691@debbugs.gnu.org
Cc: Fabian Ezequiel Gallina <galli.87@gmail.com>
Subject: bug#19691:
Date: Mon, 2 Feb 2015 17:28:12 -0300	[thread overview]
Message-ID: <CAELgYhd4bvttQ_9bkqX90muN_1GSTR6=C08vnQJv_AUtWutY4w@mail.gmail.com> (raw)
In-Reply-To: <87vbjt4o1d.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

Here is a patch updated against current master.

I know you have closed this issue, but please reconsider it in the
light of my new proposal: it's very simple and PEP 8 friendly.

The implementation just set a :no-indent context after two or more
consecutive blank lines. That's it.

PEP 8 states: Separate top-level function and class definitions with
two blank lines.

This is not mandatory, of course, but it's often the real intention of
the coder and, in any case, it promotes honoring basic conventions.

Cheers
--
Carlos

[-- Attachment #2: top-level.patch --]
[-- Type: text/x-patch, Size: 798 bytes --]

diff --git a/.emacs.d/lisp/python.el b/.emacs.d/lisp/python.el
index bade9d9..788d09f 100644
--- a/.emacs.d/lisp/python.el
+++ b/.emacs.d/lisp/python.el
@@ -963,6 +963,15 @@ keyword
        ((let ((start (python-info-dedenter-statement-p)))
           (when start
             (cons :at-dedenter-block-start start))))
+       ;; After two or more blank lines.
+       ((save-excursion
+          (when (and (progn
+                       (forward-line -1)
+                       (python-info-current-line-empty-p))
+                     (progn
+                       (forward-line -1)
+                       (python-info-current-line-empty-p)))
+            (cons :no-indent 0))))
        ;; After normal line.
        ((let ((start (save-excursion
                        (back-to-indentation)

  parent reply	other threads:[~2015-02-02 20:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 14:25 bug#19691: 24.4; python.el: indentation RFE Carlos Pita
2015-01-30  3:52 ` Fabián Ezequiel Gallina
     [not found] ` <handler.19691.D19691.14225899572400.notifdone@debbugs.gnu.org>
2015-01-30 10:18   ` bug#19691: closed (24.4; python.el: indentation RFE) Carlos Pita
2015-02-02 20:28 ` Carlos Pita [this message]
2015-02-04 22:56   ` bug#19691: Fabián Ezequiel Gallina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAELgYhd4bvttQ_9bkqX90muN_1GSTR6=C08vnQJv_AUtWutY4w@mail.gmail.com' \
    --to=carlosjosepita@gmail.com \
    --cc=19691@debbugs.gnu.org \
    --cc=galli.87@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.