             (add-to-list 'ac-sources 'ac-source-math-latex)))
 
 ;; scratchpad buffers
-(require 'scratch)
-;; don't want to remember which key I used
-(global-set-key (kbd "C-c b") 'scratch)
-;; don't start in lisp
-(setq initial-major-mode 'org-mode)
-(setq initial-scratch-message nil)
+(setup "scratch"
+       ;; don't want to remember which key I used
+       (global-set-key (kbd "C-c b") 'scratch)
+       ;; don't start in lisp
+       (setq initial-major-mode 'org-mode)
+       (setq initial-scratch-message nil))
 
 ;; oh pretty!
-(require 'pretty-lambdada)
-(global-pretty-lambda-mode)
-
-
-;; support for bookmarks
-;;(require 'breadcrumb)
-;;(global-set-key (kbd "C-c m") 'bc-set)
-;;(global-set-key (kbd "M-SPC") 'bc-previous)
-;;(global-set-key (kbd "M-S-SPC") 'bc-next)
-;;(setq bc-bookmark-limit 1000)
-;;(setq bc-bookmark-file (expand-file-name "~/.emacs.d/cache/breadcrumb"))
+(setup "pretty-lambdada"
+       (global-pretty-lambda-mode))
+
+
 ;; normal bookmarks
 (setq bookmark-default-file "~/.emacs.d/cache/bookmarks")
 

                   (,(kbd "C-z") suspend-frame)
                   ([(insert)] overwrite-mode)
                   ([(insertchar)] overwrite-mode)
                   (,(kbd "C-v") scroll-up-command)
                   (,(kbd "M-v") scroll-down-command)
                   (,(kbd "C-]") abort-recursive-edit)
                   (,(kbd "C-@") set-mark-command)
                   (,(kbd "<C-down-mouse-1>") mouse-buffer-menu)

                    (define-key phi-search-default-map (kbd "<C-down>") 'phi-search-mc/mark-next)
                    (define-key phi-search-default-map (kbd "<C-up>")   'phi-search-mc/mark-previous)
                    (define-key phi-search-default-map (kbd "C-c C-k")  'phi-search-mc/mark-all)))

;; edit symbol in multiple places simultaneously
(setup-lazy '(iedit-mode) "iedit"
            (global-set-key (kbd "C-c ;") 'iedit-mode)
            (global-set-key (kbd "C-c C-;") 'iedit-mode-toggle-on-function))

;; undo tree
(global-undo-tree-mode)
