   (interactive)
   (save-excursion
     (if (and (not (= (current-column) 0))
-	     (re-search-backward "[ \t]" 0 t ))
-	(forward-char))
+             (re-search-backward "[ \t]" 0 t ))
+        (forward-char))
     (let ((retn 0)
-	  (old-column (current-column))
-	  (old-next-line-add-newlines))
+          (old-column (current-column))
+          (old-next-line-add-newlines))
       (setq next-line-add-newlines nil)
       (while (not
-	      (looking-at "^[ \t]*$"))
-	(move-to-column old-column t)
-	(if (and (looking-at "-?[0123456789]+")
-		 (eq (current-column) old-column))
-		(setq retn (+ retn (string-to-number (current-word)))))
-	(next-line)
-	(beginning-of-line))
+              (looking-at "^[ \t]*$"))
+        (move-to-column old-column t)
+        (if (and (looking-at "-?[0123456789]+")
+                 (eq (current-column) old-column))
+            (setq retn (+ retn (string-to-number (current-word)))))
+        (next-line)
+        (beginning-of-line))
       (next-line)
       (next-line)
       (move-end-of-line 0)

(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)

;; org mode
(setq org-agenda-files (list "~/wiki/Work.org" "~/wiki/Work.org_archive"))
(setq org-hide-leading-stars t)
(setq org-log-done t)
(setq org-agenda-skip-archived-trees nil)
(setq org-highlight-sparse-tree-matches nil)
(global-set-key "\C-ca" 'org-agenda)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
;; persist the "anything" keybinding in org-mode
(defun org-mode-setup ()
  (define-key org-mode-map (kbd "C-<return>") 'anything)
  (define-key org-mode-map (kbd "C-M-<return>") 'org-meta-return))
(add-hook 'org-mode-hook 'org-mode-setup)

;; restructured text
(autoload 'rst-mode "rst" "restructured text" t)

(autoload 'gist-region-private "gist" "Gist" t)
(autoload 'gist-region-or-buffer "gist" "Gist" t)
(autoload 'gist-region-or-buffer-private "gist" "Gist" t)

;; Highlight the current line
(global-hl-line-mode t)
(set-face-background 'hl-line "#eeeeee")

;; Rebind keys
(global-set-key (kbd "C-!") 'shell-command)
(global-set-key (kbd "C-|") 'shell-command-on-region)
(global-set-key (kbd "C-c C-r") 'sudo-edit-current-file)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cl" 'org-store-link)
;; Hippie expansion
(global-set-key (kbd "C-SPC") (make-hippie-expand-function
                             '(try-complete-file-name-partially
                               try-complete-file-name
                               try-expand-dabbrev) t))
;; New ergonomic bindings
;;://xahlee.org/emacs/ergonomic_emacs_keybinding.html
(load "ergonomic_keybinding_qwerty")
;; I don't like all of them
(global-set-key (kbd "C-n") 'make-frame-command)
(global-set-key (kbd "C-b") 'switch-to-buffer)
(global-set-key
     "\M-a"
     (lambda ()
       (interactive)
       (call-interactively
        (intern
         (ido-completing-read
          "M-a "
          (all-completions "" obarray 'commandp))))))

;; add a column of numbers
(defun sum-column()
