diff options
author | Guido van Rossum <guido@python.org> | 1999-06-08 12:54:23 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-06-08 12:54:23 (GMT) |
commit | 0fcd635d418d444b2f64da7695f4d48b8bf637bd (patch) | |
tree | e68d414b4600ff9e4cf9f65a549b06d3b460c214 /Tools | |
parent | df9f7a3e525ced6f8771ff651c536574b93c0af6 (diff) | |
download | cpython-0fcd635d418d444b2f64da7695f4d48b8bf637bd.zip cpython-0fcd635d418d444b2f64da7695f4d48b8bf637bd.tar.gz cpython-0fcd635d418d444b2f64da7695f4d48b8bf637bd.tar.bz2 |
Tim Peters:
+ Set usetabs=1. Editing pyclbr.py was driving me nuts <0.6 wink>.
usetabs=1 is the Emacs pymode default too, and thanks to indentwidth !=
tabwidth magical usetabs disabling, new files are still created with tabs
turned off. The only implication is that if you open a file whose first
indent is a single tab, IDLE will now magically use tabs for that file (and
set indentwidth to 8). Note that the whole scheme doesn't work right for
PythonWin, though, since Windows users typically set tabwidth to 4; Mark
probably has to hide the IDLE algorithm from them (which he already knows).
+ Changed comment_region_event to stick "##" in front of every line. The
"holes" previously left on blank lines were visually confusing (made it
needlessly hard to figure out what to uncomment later).
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/idle/AutoIndent.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Tools/idle/AutoIndent.py b/Tools/idle/AutoIndent.py index 9c088fa..1bdb05b 100644 --- a/Tools/idle/AutoIndent.py +++ b/Tools/idle/AutoIndent.py @@ -99,7 +99,7 @@ class AutoIndent: # tab setting causes it to use an entirely different tabbing algorithm, # treating tab stops as fixed distances from the left margin. # Nobody expects this, so for now tabwidth should never be changed. - usetabs = 0 + usetabs = 1 indentwidth = 4 tabwidth = TK_TABWIDTH_DEFAULT @@ -349,8 +349,7 @@ class AutoIndent: head, tail, chars, lines = self.get_region() for pos in range(len(lines)): line = lines[pos] - if line: - lines[pos] = '##' + line + lines[pos] = '##' + line self.set_region(head, tail, chars, lines) def uncomment_region_event(self, event): |