 
 ;; save minibuffer history
 (savehist-mode 1)
+(setq history-length 1500)
 (setq savehist-file "~/.emacs.d/cache/history")
 (setq savehist-additional-variables '(search-ring
                                        regexp-search-ring

                ido-temp-list))))

;; use y/n instead of yes/no
(fset 'yes-or-no-p 'y-or-n-p)   


(setq org-completion-use-ido t)

;; normal bookmarks
(setq bookmark-default-file "~/.emacs.d/cache/bookmarks")

;; unset unwanted default keys
(loop for key in `(
                   (,(kbd "C-x C-z") suspend-frame)
                   (,(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)
                   (,(kbd "<C-down-mouse-2>") facemenu-menu)
                   (,(kbd "<S-down-mouse-1>") mouse-appearance-menu)
                   (,(kbd "C-x C-t") transpose-lines)
                   (,(kbd "C-x C-q") read-only-mode)
                   (,(kbd "C-x C-o") delete-blank-lines)
                   (,(kbd "C-x C-n") set-goal-column)
                   (,(kbd "C-x TAB") indent-rigidly)
                   (,(kbd "C-x C-e") eval-last-sexp)
                   (,(kbd "C-x C-d") list-directory)
                   (,(kbd "C-x C-@") pop-global-mark)
                   (,(kbd "C-x SPC") gud-break)
                   (,(kbd "C-x #") server-edit)
                   (,(kbd "C-x $") set-selective-display)
                   (,(kbd "C-x '") expand-abbrev)
                   (,(kbd "C-x <") scroll-left)
                   (,(kbd "C-x =") what-cursor-position)
                   (,(kbd "C-x >") scroll-right)
                   (,(kbd "C-x [") backward-page)
                   (,(kbd "C-x ]") forward-page)
                   (,(kbd "C-x ^") enlarge-window)
                   (,(kbd "C-x `") next-error)
                   (,(kbd "C-x l") count-lines-page)
                   (,(kbd "C-x v") vc-prefix-map)
                   (,(kbd "C-x {") shrink-window-horizontally)
                   (,(kbd "C-x }") enlarge-window-horizontally)
                   (,(kbd "C-M-@") mark-sexp)
                   (,(kbd "C-M-d") down-list)
                   (,(kbd "C-M-l") reposition-window)
                   (,(kbd "C-M-n") forward-list)
                   (,(kbd "C-M-p") backward-list)
                   (,(kbd "C-M-t") transpose-sexps)
                   (,(kbd "C-M-u") backward-up-list)
                   (,(kbd "C-M-v") scroll-other-window)
                   (,(kbd "C-M-\\") indent-region)
                   (,(kbd "M-$") ispell-word)
                   (,(kbd "M-%") query-replace)
                   (,(kbd "M-'") abbrev-prefix-mark)
                   (,(kbd "M-(") insert-parentheses)
                   (,(kbd "M-)") move-past-close-and-reindent)
                   (,(kbd "M-*") pop-tag-mark)
                   (,(kbd "M-.") find-tag)
                   (,(kbd "M-,") tags-loop-continue)
                   (,(kbd "M-/") dabbrev-expand)
                   (,(kbd "M-=") count-words-region)
                   (,(kbd "M-@") mark-word)
                   (,(kbd "M-\\") delete-horizontal-space)
                   (,(kbd "M-`") tmm-menubar)
                   (,(kbd "M-a") backward-sentence)
                   (,(kbd "M-e") forward-sentence)
                   (,(kbd "M-m") back-to-indentation)
                   (,(kbd "M-o") facemenu-keymap)
                   (,(kbd "M-r") move-to-window-line-top-bottom)
                   (,(kbd "M-{") backward-paragraph)
                   (,(kbd "M-}") forward-paragraph)
                   (,(kbd "M-~") not-modified)
                   (,(kbd "C-M-S-v") scroll-other-window-down)
                   (,(kbd "C-M-%") query-replace-regexp)
                   (,(kbd "C-M-.") find-tag-regexp)
                   (,(kbd "C-M-/") dabbrev-completion)
                   )
      collect (if (eq (key-binding (first key)) (second key))
                  (global-unset-key (first key))))


;; semantic (code parser)
(require 'semantic)
