[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: python-mode (python.el): python-backspace
From: |
Karl Chen |
Subject: |
Re: python-mode (python.el): python-backspace |
Date: |
Mon, 17 May 2004 10:38:33 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) |
>>>>> "Dave" == Dave Love <address@hidden> writes:
Dave>
Dave> Karl Chen <address@hidden> writes:
>> Python.el's python-backspace: Close the current block
>>
>> Counter-intuitive in many cases, such as if point is
>> already left of where python-backspace moves indents to
>> (backspace moves the cursor rightward?!)
Dave>
Dave> I don't understand that.
Suppose you have typed the following, where | represents point.
Here are 4 cases of where point is, and where it ends up after
<backspace>.
# 1:
class Class: class Class:
def fun(): ==> def fun():
if foo: if foo:
bar() bar()
| |
# 2:
class Class: class Class:
def fun(): ==> def fun():
if foo: if foo:
bar() bar()
| |
# 3:
class Class: class Class:
def fun(): ==> def fun():
if foo: if foo:
bar() bar()
| |
# 4:
class Class: class Class:
def fun(): ==> def fun():
if foo: if foo:
bar() bar()|
|
The first and fourth cases make sense. But cases 2 and 3 are
counter-intuitive in my opinion, especially #3 where the cursor
moves rightward on <backspace>.
The behavior I recommend is that the cursor/indentation moves left
in cases 1-3:
# 1:
class Class: class Class:
def fun(): ==> def fun():
if foo: if foo:
bar() bar()
| |
# 2:
class Class: class Class:
def fun(): ==> def fun():
if foo: if foo:
bar() bar()
| |
# 3:
class Class: class Class:
def fun(): ==> def fun():
if foo: if foo:
bar() bar()
| |
# 4:
class Class: class Class:
def fun(): ==> def fun():
if foo: if foo:
bar() bar()|
|
I didn't mean to compare <backspace> to the other python-mode
implementation for compatibility or old time's sake, but because
I like its behavior better
--
Karl 2004-05-17 10:17
- python-mode (python.el): python-backspace, Karl Chen, 2004/05/16
- Re: python-mode (python.el): python-backspace, Dave Love, 2004/05/17
- Re: python-mode (python.el): python-backspace,
Karl Chen <=
- Re: python-mode (python.el): python-backspace, Richard Stallman, 2004/05/17
- Re: python-mode (python.el): python-backspace, Stefan Monnier, 2004/05/18
- Re: python-mode (python.el): python-backspace, Karl Chen, 2004/05/18
- Re: python-mode (python.el): python-backspace, Dave Love, 2004/05/18