                           (t 120)))
   (whitespace-mode -1)
   (whitespace-mode))
+
+;; switch to the compile buffer
 (defun me:switch-to-compile-buffer ()
   (interactive)
   (switch-to-buffer "*compilation*"))

  (when (and (>= (recursion-depth) 1) (active-minibuffer-window))
    (abort-recursive-edit)))

(defun me:save-dirty-buffers ()
  "Save any dirty buffers"
  (interactive)
  (save-some-buffers t))

;; Select the nth buffer in the buffer list
;; TODO: must be a better way...
(defun me:select-nth-other-buffer (n)
  (let ((buffer (nth n (-filter 'buffer-file-name (buffer-list)))))
    (if buffer
        (switch-to-buffer buffer))))
(defun me:select-1st-other-buffer ()
  (interactive)
  (me:select-nth-other-buffer 1 ))
(defun me:select-2nd-other-buffer ()
  (interactive)
  (me:select-nth-other-buffer 2 ))
(defun me:select-3rd-other-buffer ()
  (interactive)
  (me:select-nth-other-buffer 3))
(defun me:select-4th-other-buffer ()
  (interactive)
  (me:select-nth-other-buffer 4))
(defun me:rotate-fill-column ()
  (interactive)
  (setq fill-column (cond ((= fill-column 70) 80)

                            "~/Dropbox/Notes"
                          "~/Notes") "Location of note files")

;; replace prefix part of a string
(defun me:replace-prefix (prefix input)
  (replace-regexp-in-string ( concat "^" (regexp-quote prefix)) "" input))

;; replace any matches in a string
(defun me:replace-all (input from to)
  (replace-regexp-in-string (regexp-quote from) to input nil))

