This is a fix for bikeemacs.py from the Bicycle Repair Man
distribution.  It fixes the column calculation of point to work when
the source contains tabs.  It was submitted to the project bug system
<URL:http://sourceforge.net/tracker/index.php?func=detail&aid=1524138
&group_id=4298&atid=104298>, but nothing has happened to it there yet.

--- bikeemacs.py	2006-07-17 22:29:02.000000000 +0100
+++ bikeemacs.py	2006-07-17 22:29:02.000000000 +0100
@@ -1,3 +1,4 @@
+# -*-coding: iso-8859-1 -*-
 # Bicycle Repair Man integration with (X)Emacs
 # By Phil Dawes (2002)
 # Uses the fabulous Pymacs package by François Pinard
@@ -265,15 +266,20 @@
     brmemacs.find_references()    
 find_references.interaction=""
 
+def char_column ():
+    """Return Python-oriented column, counting tab as a normal character."""
+    # `point-at-bol' is defined in XEmacs and Emacs 21.
+    return lisp.point() - lisp.point_at_bol()
+
 def _getCoords():
     line = lisp.count_lines(1,lisp.point())
-    col = lisp.current_column()
+    col = char_column()
     if col == 0:            
         line += 1  # get round 'if col == 0, then line is 1 out' problem
 
     if mark_exists() and lisp.point() > lisp.mark():
         lisp.exchange_point_and_mark()
-        col = lisp.current_column()
+        col = char_column()
         lisp.exchange_point_and_mark()
     return line,col
 
@@ -326,7 +332,7 @@
 
 def _getPointCoords():
     bline = lisp.count_lines(1,lisp.point())
-    bcol = lisp.current_column()
+    bcol = char_column()
     if bcol == 0:  # get round line is one less if col is 0 problem
         bline += 1
     return bline,bcol

