fix-pymode-tab-space.dpatch

Jörg Sommer joerg at alea.gnuu.de
Thu Jan 11 21:47:12 CET 2007


Hello Günther,

G. Milde schrieb am Thu 11. Jan, 12:31 (+0100):
> On 10.01.07, Jörg Sommer wrote:
> > > My suggestion would be:
> > > 
> > > +private define py_whitespace(n)
> > > +{
> > > +   if ( get_blocal_var("py_use_tab") )
> > > +      whitespace(n);
> > > +   else
> > > +      insert_spaces(n);
> > > +}
> 
> > I change it.
> 
> Actually, it gets more complicated, as for consistency in existing
> documents we need to override USE_TABS as well.

What do you think about

private define py_whitespace(n)
{
   if ( get_blocal_var("py_use_tab") )
   {
       loop (n / TAB) insert_char('\t');
       n -= n / TAB * TAB;
   }
   insert_spaces(n);
}

> > > The choice of py_use_tab is non-intuitive and undocumented. 
> 
> > It's a bug fix and not intended for other usage.
> 
> Agreed. What I wanted to say is: the way the patched python_mode()
> determines whether to use tabs or spaces for indentation (as stored in
> py_use_tab) is non-intuitive and undocumented.

I don't think it's non‐intuitive, but right it's undocumented. I've added
an explanation. Is this ok?

Bye, Jörg.
-- 
A red sign on the door of a physics professor: 'If this sign is blue,
you're going too fast.'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-jed-devel/attachments/20070111/f059be51/attachment.pgp


More information about the Pkg-jed-devel mailing list