|(defun smart-line-beginning ()|
|"Move point to the beginning of text on the current line; if that is already the current position of point, then move it to the beginning of the line."|
|(let ((pt (point)))|
|(when (eq pt (point))|
|(global-set-key "\C-a" 'smart-beginning-of-line)|
I am unsure which of these make it work in my setup ..
.. but I think it's the last one