Bug#305668: [Pkg-jed-devel] Bug#305668: jed mixes tabs and spaces in python mode

Jörg Sommer Jörg Sommer <joerg@alea.gnuu.de>, 305668@bugs.debian.org
Fri, 22 Apr 2005 22:15:22 +0200


--K8nIJk4ghYZn606h
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Vincent Bernat schrieb am Thu 21. Apr, 11:14 (+0200) :
> Package: jed
> Version: 0.99.16-5
> Severity: normal
>=20
> When writing programs using python-mode, jed mixes tabs and spaces.
> For example, type this script without ever using the tab key :
>=20
> #! /usr/bin/env python
>=20
> def test1(arg):
>     # This line is indented using 4 spaces
>     # This line too
>     if 1 =3D=3D 1:
>         # However, this line is indented using one tab.
> 	pass

You can avoid this, by setting TAB=3D0 for pymode. Try this patch for
pymode.sl in /usr/share/jed/lib/

--- /tmp/jed-B0.99-17.56/lib/pymode.sl  2004-11-28 22:44:05.000000000 +0100
+++ /usr/share/jed/lib/pymode.sl        2005-04-22 22:11:19.000000000 +0200
@@ -580,7 +580,13 @@
 {
    variable python =3D "python";
   =20
-   TAB =3D 8;
+   % TAB is checked by whitespace(). If TAB=3D0 no tab character is used,
+   % which avoids mixing up whitespace and tab indention
+   if (Py_Indent_Level =3D=3D 8)
+     TAB =3D 8;
+   else
+     TAB =3D 0;
+

Thank you for reporting this bug,

J=F6rg.

--=20
Objektivit=E4t ist die Wahnvorstellung, Beobachtungen k=F6nnten ohne
Beobachter gemacht werden - Heinz v. Foerster

--K8nIJk4ghYZn606h
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iQEVAwUBQmlbWoZ13Cz2nwVYAQKZ0wf/WKO7pPckZozrR6co7boBJy2x64j/E4Jc
KJJdiLKnpSaFqACsirn6ZIlcxCuUgZnngQ49wV0sBfL0DyER2I4jLbhL8a4gAZA5
bu/O5aYZxvmjMe3B42fSXpKvPol3lfY21JNu5HWZTPan3A/9LE5k4y2X0TmBjL4I
BKOTkDKp73V14kkvYlwkg/T+KgScKNwpGSewNWL5D5KFInLdK6e/JPDEqu09+bia
lp9fsuTlYJSJHpJk5ytBHb3o41J3WA9io8ifJmfUxpCfAGM57LZ2QJ0O+/zfOhYB
azLOpM+YWGonFeMWz4wxT/m16HNcabZKefIM974h1meSaVDZRSzenQ==
=xEZS
-----END PGP SIGNATURE-----

--K8nIJk4ghYZn606h--