 (show-paren-mode 1)
 ;; (setq show-paren-style 'expression)
 (transient-mark-mode t)
-(menu-bar-mode -1)
 (which-function-mode)
 (semantic-mode 1)
 ;; (iswitchb-mode t)   ;; substring buffer switch

(global-set-key (kbd "C-x k")
                '(lambda () (interactive)
                   (let (kill-buffer-query-functions) (kill-buffer))))
(define-key function-key-map "\e[$" (kbd "C-$"))
(define-key function-key-map "\e[%" (kbd "C-%"))
(define-key function-key-map "\e[," (kbd "C-,"))

(setq gc-cons-threshold 20000000)

(require 'package)
(package-initialize)

(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)

(require 'diminish)

(defun display-startup-echo-area-message nil nil)
(menu-bar-mode -1)

(if window-system
    (progn
      (tool-bar-mode -1)
      (tooltip-mode -1)
      (scroll-bar-mode -1)
      (fringe-mode 2)))

(setq inhibit-startup-message t
      initial-scratch-message nil)

(defconst package-list '(exec-path-from-shell
                         json-mode
                         lua-mode
                         haskell-mode
                         nim-mode
                         processing-mode
                         restart-emacs
                         diffview
                         ag
                         helm
                         helm-ag
                         helm-descbinds
                         helm-swoop
                         projectile
                         helm-projectile
                         super-save
                         anzu
                         smartscan
                         shell
                         avy
                         ace-jump-helm-line
                         saveplace
                         quelpa
                         quelpa-use-package
                         ninja-mode
                         ;; clojure-mode    ;; TODO: pin melpa-stable
                         ;; cider  ;; pin melpa-stable
                         pixie-mode
                         browse-kill-ring
                         easy-kill
                         whitespace
                         shrink-whitespace
                         expand-region
                         visual-regexp
                         eldoc
                         rainbow-mode
                         smart-mode-line
                         smart-mark
                         google-translate
                         mwim
                         glsl-mode
                         clang-format
                         highlight-symbol
                         company
                         popup
                         rtags
                         elpy
                         racket-mode
                         wanderlust
                         ))

(unless package-archive-contents
  (package-refresh-contents))
(dolist (package package-list)
  (unless (package-installed-p package)
    (package-install package)))

(setq compilation-ask-about-save nil
      compilation-always-kill t
      compilation-scroll-output 'first-error
      next-line-add-newlines nil
      load-prefer-newer t
      require-final-newline t
      column-number-mode t
      make-backup-files nil
      delete-auto-save-files t
