[Pkg-jed-commit] r31 - trunk/packages/jed/debian/patches

Jörg Sommer jo-guest@costa.debian.org
Fri, 22 Apr 2005 21:22:27 +0000


Author: jo-guest
Date: 2005-04-22 21:22:26 +0000 (Fri, 22 Apr 2005)
New Revision: 31

Added:
   trunk/packages/jed/debian/patches/50_pymode_indent.dpatch
Modified:
   trunk/packages/jed/debian/patches/00list
Log:
* fix pymode.sl to not mix up tab and whitespace characters for
  indentation


Modified: trunk/packages/jed/debian/patches/00list
===================================================================
--- trunk/packages/jed/debian/patches/00list	2005-04-22 21:22:15 UTC (rev 30)
+++ trunk/packages/jed/debian/patches/00list	2005-04-22 21:22:26 UTC (rev 31)
@@ -5,4 +5,5 @@
 50_enable-xrenderfont
 50_emacs-bindings
 50_paste-mode-sl
+50_pymode_indent
 60_gpm-mouse-support

Added: trunk/packages/jed/debian/patches/50_pymode_indent.dpatch
===================================================================
--- trunk/packages/jed/debian/patches/50_pymode_indent.dpatch	2005-04-22 21:22:15 UTC (rev 30)
+++ trunk/packages/jed/debian/patches/50_pymode_indent.dpatch	2005-04-22 21:22:26 UTC (rev 31)
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 50_pymode_indent.dpatch by Jörg Sommer <joerg@alea.gnuu.de>
+##
+## DP: If Py_Indent_Level is != 8 whitespace() (used to indent lines)
+## DP: mixes up tab and whitespace characters for indention. This is bad
+## DP: Python style.
+## DP: (P_I_L=4 -> level 1 = 4 whitespace, level 2 = 1 tab)
+## DP: Fixes #305668
+
+@DPATCH@
+diff -urNad jed-B0.99-17.56/lib/pymode.sl /tmp/dpep.1VBPmj/jed-B0.99-17.56/lib/pymode.sl
+--- jed-B0.99-17.56/lib/pymode.sl	2004-11-28 22:44:05.000000000 +0100
++++ /tmp/dpep.1VBPmj/jed-B0.99-17.56/lib/pymode.sl	2005-04-22 22:18:21.436779048 +0200
+@@ -580,7 +580,13 @@
+ {
+    variable python = "python";
+    
+-   TAB = 8;
++   % TAB is checked by whitespace(). If TAB=0 no tab character is used,
++   % which avoids mixing up whitespace and tab indention
++   if (Py_Indent_Level == 8)
++     TAB = 8;
++   else
++     TAB = 0;
++
+    set_mode (python, 0x4); % flag value of 4 is generic language mode
+    use_keymap(python);
+    set_buffer_hook ("indent_hook", "py_indent_line");


Property changes on: trunk/packages/jed/debian/patches/50_pymode_indent.dpatch
___________________________________________________________________
Name: svn:executable
   + *