   (setq ns-use-srgb-colorspace nil)
   (setq mac-command-modifier 'meta)
   (setq exec-path (append exec-path '("~/homebrew/bin"
-				      "~/homebrew/Cellar/llvm/HEAD/bin"
-				      "/usr/local/bin"))))
-
-;;;; Set up package tls
+                                      "~/homebrew/Cellar/llvm/HEAD/bin"
+                                      "/usr/local/bin"))))
+
+;;;; Set up package tls START
 
 (require 'cl)
 (require 'package)
 (require 'tls)
 
 (assert (executable-find "gnutls-cli") nil
-	"Need brew install gnutls or apt-get install gnutls-bin")
+        "Need brew install gnutls or apt-get install gnutls-bin")
 (assert (eq 0 (call-process-shell-command "python -c \"import certifi\"")) nil
-	"Need python -m pip install --user certifi")
+        "Need python -m pip install --user certifi")
 
 (let ((trustfile
        (replace-regexp-in-string
         "\\\\" "/"
         (replace-regexp-in-string
          "\n" ""
-	 (shell-command-to-string "python -m certifi")))))
+         (shell-command-to-string "python -m certifi")))))
   (setq tls-program
         (list
          (format "gnutls-cli --x509cafile %s -p %%p %%h" trustfile)))

              ("^" . mc/edit-beginnings-of-lines)
              ("$" . mc/edit-ends-of-lines)))

;;;; Editing END

;;;; Buffers START
(use-package menu-bar

(defun ar/edit-init ()
  (interactive)
  (find-file "~/stuff/active/code/dots/emacs/newinit.el"))
;;;; Init maintenance END

;;;; Editing START

;; Prevent Extraneous Tabs.
;; From http://www.gnu.org/software/emacs/manual/html_node/eintr/Indent-Tabs-Mode.html
(setq-default indent-tabs-mode nil)

(use-package expand-region
  :ensure t
  :bind ("C-c w" . er/expand-region))

(use-package whitespace
  ;; Automatically remove whitespace on saving.
  :hook ((before-save . whitespace-cleanup)
         (prog-mode . whitespace-mode))
  :config
  ;; When nil, fill-column is used instead.
  (validate-setq whitespace-line-column nil)
  ;; Highlight empty lines, TABs, blanks at beginning/end, lines
  ;; longer than fill-column, and trailing blanks.
  (validate-setq whitespace-style '(face empty tabs lines-tail trailing))
  (validate-setq show-trailing-whitespace t)
  (set-face-attribute 'whitespace-line nil
                      :foreground "DarkOrange1"
                      :background "default"))

(use-package smartparens :ensure t
  ;; Add to minibuffer also.
  :hook ((minibuffer-setup . smartparens-mode))
  :config
  (require 'smartparens-config)
  (require 'smartparens-html)
  (require 'smartparens-python)
  (smartparens-global-strict-mode +1)

  (defun ar/kill-region-advice-fun (orig-fun &rest r)
    "Advice function around `kill-region' (ORIG-FUN and R)."
    (if (or (null (nth 2 r)) ;; Consider kill-line (C-k).
            mark-active)
        (apply orig-fun r)
      ;; Kill entire line.
      (let ((last-command (lambda ())) ;; Override last command to avoid appending to kill ring.
            (offset (- (point)
                       (line-beginning-position))))
        (apply orig-fun (list (line-beginning-position)
                              (line-end-position)
                              nil))
        (delete-char 1)
        (forward-char (min offset
                           (- (line-end-position)
                              (line-beginning-position)))))))

  (advice-add 'kill-region
              :around
              'ar/kill-region-advice-fun)

  ;; I prefer keeping C-w to DWIM kill, provided by
  ;; `ar/kill-region-advice-fun'. Removing remap.
  ;;   (define-key smartparens-strict-mode-map [remap kill-region] nil)

  (defun ar/smartparens-wrap-square-bracket (arg)
    "[] equivalent of `paredit-wrap-round'."
    (interactive "P")
    (save-excursion
      (unless (sp-point-in-symbol)
        (backward-char))
      (sp-wrap-with-pair "["))
    (insert " "))

  :bind (:map smartparens-strict-mode-map
              ([remap kill-region] . kill-region)
              ("C-c <right>" . sp-forward-slurp-sexp)
              ("C-c <left>" . sp-forward-barf-sexp)
              ("M-[" . sp-rewrap-sexp)
              :map smartparens-mode-map
              ("M-]" . ar/smartparens-wrap-square-bracket)))


(use-package region-bindings-mode
  :ensure t
