I made a small custom function to do this in my setup. When I press Ca and not indentation, it returns to indentation. If so, it goes to the beginning of the line.
;; Remap C-a to more useful behaviour (a press anywhere other than at the indentation preforms the effect of back-to-indetation, otherwise, the normal C-a behaviour is used.
(global-set-key (kbd "C-a") (lambda () (interactive)
(let ((previous-point (point)))
(back-to-indentation)
(if (equal (point) previous-point) (move-beginning-of-line 1)))))
source
share