.emacs-my
changeset 1158 89f674f09ca3
parent 1157 2036f6052212
child 1162 aadda3d1653c
child 1164 ca644074aac4
equal deleted inserted replaced
1157:2036f6052212 1158:89f674f09ca3
   755 (message "key binding, short-keys")
   755 (message "key binding, short-keys")
   756 
   756 
   757 (defun my-smart-beginning-of-line ()
   757 (defun my-smart-beginning-of-line ()
   758   "Move point to beginning-of-line. If repeat command it cycle
   758   "Move point to beginning-of-line. If repeat command it cycle
   759 position between `back-to-indentation' and `beginning-of-line'."
   759 position between `back-to-indentation' and `beginning-of-line'."
   760   (interactive)
   760   (interactive "^")
   761   (if (and (eq last-command 'my-smart-beginning-of-line)
   761   (if (and (eq last-command 'my-smart-beginning-of-line)
   762            (= (line-beginning-position) (point)))
   762            (= (line-beginning-position) (point)))
   763       (back-to-indentation)
   763       (back-to-indentation)
   764     (beginning-of-line)))
   764     (beginning-of-line)))
   765 
   765