Two good emacs commands

I use emacs for 5 years now and, surprisingly, two most used commands for me are jumping between lines with same identation.

(defun next-same-indentation ()
  (interactive)
  (let ((target-indentation (current-indentation)))
    (while (progn
             (next-line)
             (or (/= target-indentation (current-indentation))
                  (string= (thing-at-point 'line) "\n"))))))

(defun previous-same-indentation ()
  (interactive)
  (let ((target-indentation (current-indentation)))
    (while (progn
             (previous-line)
             (or (/= target-indentation (current-indentation))
                  (string= (thing-at-point 'line) "\n"))))))

(global-set-key "\C-cn" 'next-same-indentation)
(global-set-key "\C-c\C-n" 'next-same-indentation)
(global-set-key "\C-cp" 'previous-same-indentation)
(global-set-key "\C-c\C-p" 'previous-same-indentation)
14 Jan 2014