* bug#8797: Incorrect Python Indentation
@ 2011-06-03 22:41 Adrian Parker
2011-06-04 2:26 ` bug#8797: Further context Adrian Parker
2012-06-18 21:36 ` bug#8797: Incorrect Python Indentation Glenn Morris
0 siblings, 2 replies; 3+ messages in thread
From: Adrian Parker @ 2011-06-03 22:41 UTC (permalink / raw)
To: 8797
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]
Version: Emacs 23.3.1
Steps to reproduce:
1. Open a Python file
2. Starting in the first column type: def some_func(
3. Press ENTER key
4. Press TAB key
Expected result:
The cursor should be in column 9. Under the "Code lay-out" heading at
http://www.python.org/dev/peps/pep-0008/ please see the suggestions
regarding continuation lines (note: its a very new change).
Actual result:
The cursor is in column 5.
turbofail in #emacs on Freenode suggested I edit my python.el and:
Replace this line:
(+ (current-indentation) (* (car syntax) python-indent))))
with this line:
(+ (current-indentation) (* 2 (car syntax) python-indent))))
That fixed the issue using an older version of Emacs at work.
Note: Sorry, I'd provide a patch but I'm on windows, and haven't diff or
patch installed.
Adrian Parker
[-- Attachment #2: Type: text/html, Size: 1243 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-18 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-03 22:41 bug#8797: Incorrect Python Indentation Adrian Parker
2011-06-04 2:26 ` bug#8797: Further context Adrian Parker
2012-06-18 21:36 ` bug#8797: Incorrect Python Indentation Glenn Morris
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).