Hi
For me it is very convenient to bind a key in such a way that it
toggles between several functions (in my case 2).
Adrian Kubala sent me the following code which proved to be very
helpful.
(defun make-repeat-command (symbol command-list)
"Command changes with each repetition.
SYMBOL is a symbol unique to this command."
(if (eq last-command symbol)
(set symbol (+ (eval symbol) 1))
(set symbol 0))
(if (>= (eval symbol) (length command-list))
(set symbol 0))
(call-interactively (nth (eval symbol) command-list))
(setq this-command symbol))
(defun my-home ()
(interactive "_")
(make-repeat-command 'my-home '(beginning-of-line-text
beginning-of-line
beginning-of-buffer)))
He seems not to have any further interest in the code. I suggest to
include it in say simple.el.
Regards
Uwe Brauer