Kristof Bastiaensen <kristof / vleeuwen.org> writes:

> On Thu, 13 May 2004 21:15:36 +0200, Ruben wrote:
>
> replacement for beginning-of-line,
> (this seems to be standard in most editors):
>
> (defun beginning-of-line-or-indent ()
>   "Go to the first non blank character on the line, 
> or if already there, to the first character."
>   (interactive)
>   (let ((oldpoint (point)))
>     (beginning-of-line 1)
>     (skip-chars-forward " \t")
>     (if (= oldpoint (point))
>         (beginning-of-line 1))))
>
> (global-set-key '(home) 'beginning-of-line-or-indent)
> (global-set-key '(control a) 'beginning-of-line-or-indent)
>
> Kristof

FYI, Emacsen by default have:

C-a -- beginning-of-line
M-m -- back-to-indentation