unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19691: 24.4; python.el: indentation RFE
@ 2015-01-26 14:25 Carlos Pita
  2015-01-30  3:52 ` Fabián Ezequiel Gallina
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Carlos Pita @ 2015-01-26 14:25 UTC (permalink / raw)
  To: 19691; +Cc: galli.87

When you're in a blank line and press Enter, IMHO it would be better if
python.el kept the cursor column position, instead of restoring the last
non-blank line indentation level.

For example, say the cursor is X:

def f():
    pass
X

When I press Enter most often I don't want to get:

def f():
    pass

    X

Instead, I think a more sensible default behaviour would be:

def f():
    pass

X

That is, to keep the cursor vertical position. This is consistent with
the criterion of auto-indenting up to the indentation of last (both
blank or non-blank) line, except for the technicality that a blank last
line is not really indented... although you still have a point position
there to infer desired indentation for the new line.

Maybe this should be made a customizable option.

What do you think? I'll try to submit a patch later today.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-04 22:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` bug#19691: Carlos Pita
2015-02-04 22:56   ` bug#19691: Fabián Ezequiel Gallina

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).