          (select-window (funcall selector)))
        (setq arg (if (plusp arg) (1- arg) (1+ arg))))))
 (define-key ctl-x-4-map (kbd "t") 'transpose-windows)
-
 ; http://www.emacswiki.org/emacs/ToggleWindowSplit
 (defun window-toggle-split-direction ()
   "Switch window split from horizontally to vertically, or vice versa.

                (set-window-buffer (windmove-find-other-window neighbour-dir) other-buf))))))))
(define-key ctl-x-4-map (kbd "y") 'window-toggle-split-direction)

; http://snarfed.org/gnu_emacs_backup_files
;; Put autosave files (ie #foo#) and backup files (ie foo~) in ~/.emacs.d/.
(custom-set-variables
  '(auto-save-file-name-transforms '((".*" "~/.emacs.d/autosaves/\\1" t)))
  '(backup-directory-alist '((".*" . "~/.emacs.d/backups/"))))

;; create the autosave dir if necessary, since emacs won't.
(make-directory "~/.emacs.d/autosaves/" t)

(global-linum-mode t)
(setq linum-format "%d  ")

;; source: http://steve.yegge.googlepages.com/my-dot-emacs-file
(defun rename-file-and-buffer (new-name)
  "Renames both current buffer and file it's visiting to NEW-NAME."
  (interactive "sNew name: ")

          (set-visited-file-name new-name)
          (set-buffer-modified-p nil))))))


;; CUSTOM EDITING FUNCTIONS ;;

(defun delete-horizontal-space-across-lines ()
  "Like delete-horizontal-space but works across newlines."
