 ;; Doesn't do anything useful...
 ;; (global-set-key (kbd "C-:") (lambda () (interactive)
 ;; (dwim-start-of-line 'comment-or-uncomment-region)))
-(global-set-key (kbd "C-M-;") (lambda () (interactive)
-                                (function-on-block 'comment-or-uncomment-region)))
+;; (global-set-key (kbd "C-M-;") (lambda () (interactive)
+                                ;; (function-on-block 'comment-or-uncomment-region)))
 
 
 ;; eval
 (global-set-key (kbd "C-#") (lambda () (interactive) (dwim-end-of-line 'eval-region)))
 (global-set-key (kbd "M-#") (lambda () (interactive) (dwim-entire-line 'eval-region)))
 (global-set-key (kbd "C-S-#") (lambda () (interactive) (dwim-start-of-line 'eval-region)))
-(global-set-key (kbd "C-M-#") (lambda () (interactive) (function-on-block 'eval-region)))
+;; (global-set-key (kbd "C-M-#") (lambda () (interactive) (function-on-block 'eval-region)))
 
 
 ;; Some standard things from e.g. chrome

      (global-set-key (kbd "C-o") 'forward-word)
      (global-set-key (kbd "C-M-o") 'forward-sentence)

      (global-set-key (kbd "M-e") 'forward-paragraph)
      (global-set-key (kbd "C-e") 'next-line)
      (global-set-key (kbd "C-M-e") 'forward-sexp)

      (global-set-key (kbd "M-i") 'backward-paragraph)
      (global-set-key (kbd "C-i") 'previous-line)
      (global-set-key (kbd "C-M-i") 'backward-sexp)


;; C-? : on region or to start of line
;; M-? : on region or all of line
;; M-S-? : on block (blankline seperated, incl. trailing newlines)
;; C-M-? : on function (or equvalent) -- disabled, use M-h to select block

(defun skip-to-next-blank-line ()
  (interactive)
  (let ((inhibit-changing-match-data t))
    (skip-syntax-forward " >")
    (unless (search-forward-regexp "^\\s *$" nil t)
      (goto-char (point-max)))))

(defun skip-to-previous-blank-line ()
  (interactive)
  (let ((inhibit-changing-match-data t))
    (skip-syntax-backward " >")
    (unless (search-backward-regexp "^\\s *$" nil t)
      (goto-char (point-min)))))

(defun point-at-beginning-of-block (&optional repeat)
  (save-excursion (skip-to-next-blank-line)
                  (point)))

(defun point-at-end-of-block (&optional repeat)
  (save-excursion (skip-to-previous-blank-line)
                  (point)))

(defun point-at-beginning-of-next-line ()
  (save-excursion (end-of-line) (forward-line)
