jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Looking for Python programmers for testing.


On 12.09.06, G. Milde wrote:
> On 11.09.06, Jörg Sommer wrote:

Dear Jedies,

I uploaded an experimental version of pymode.sl to
http://jedmodes.sf.net/mode/pymode/

it is an offpring of a version in long and successfull use at my place
and tries to address the recently discusses problems.

> > The old version set TAB to zero if Py_Indent_Level != 8. 
> I hope we can agree, that this is a strange behaviour.
> 
> > > My suggestion would be a separation of these two settings by
> > > introducing a variable Py_Use_Tabs ...

Done.

> > > The Tab-detecting in the proposed patch ...  favours Tabs in the
> > > case of an unconsistent file: one single Tab will turn "py_use_tab"
> > > on.
> > 
> > Sorry, but anywhere you must make a break. Don't try to be more
> > intelligent then the user. 
> 
> However, in the light of the strong preference of spaces in the
> "Style Guide for Python Code" (http://www.python.org/dev/peps/pep-0008/)
> I would prefer a bias towards Spaces. Others might disagree and this is
> why I suggest Py_Use_Tabs. A configurable bias also solves the case of
> new files.

Done.

> > Inconsistent cases must be fixed by the user.
> 
> Agreed. It would be nice if the auto-detection issued a warning in case
> of mixed tabs and spaces, though.

Done: if mixed indention is detected, the user is asked whether to
fix and if the answer is yes, untab() is called on the buffer.

> > Mangling the variable TAB is not a good idea.
> 
> IMO, there is no problem, if combined with either auto-detection or
> conversion. Even better: The ^I-s will show you where the automatism
> failed (and IMO it is ok to have ^I-s in strings containing hard tabs).
  (The Python Style Guide recommends "\t" over hard tabs in strings)
  
  
Additionally, the py_reindend() function now works fine with continuation
lines.


Please have a look, test and tell me suggestions.

Günter

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]