 (require 'company)
 (require 'company-elisp)
 
-;; Use hungry-delete in elisp too.  There is also
-;; `turn-on-hungry-delete-mode', but it seems that paredit's mode map
-;; is coming first.
-(define-key paredit-mode-map (kbd "C-d") 'hungry-delete-forward)
-
-;; When evaluating lisp in the minibuffer, use paredit and eldoc.
-(add-hook 'eval-expression-minibuffer-setup-hook #'paredit-mode)
+;; When evaluating lisp in the minibuffer, use eldoc.
 (add-hook 'eval-expression-minibuffer-setup-hook #'eldoc-mode)
 
 ;; from http://endlessparentheses.com/eval-result-overlays-in-emacs-lisp.html

;; Use paredit for all the lisp modes I use.
(defun switch-on-paredit ()
  (turn-off-smartparens-mode)
  (smartparens-strict-mode -1)
  (paredit-mode 1))

(dolist (hook
         '(clojure-mode-hook
           emacs-lisp-mode-hook
           scheme-mode-hook
           lisp-mode-hook
           ielm-mode-hook))
  (add-hook hook 'switch-on-paredit))

(use-package paredit
  :diminish "")

;; Paredit's C-M-f and C-M-b are really handy but difficult to type.
(require 'paredit)
(define-key paredit-mode-map (kbd "s-f") #'paredit-forward)
(define-key paredit-mode-map (kbd "s-b") #'paredit-backward)
;; Likewise for other sexp commands.
(define-key paredit-mode-map (kbd "s-u") #'paredit-backward-up)
(define-key paredit-mode-map (kbd "s-d") #'paredit-forward-down)
(define-key paredit-mode-map (kbd "<s-backspace>") #'backward-kill-sexp)
(define-key paredit-mode-map (kbd "s-k") #'kill-sexp)
(define-key paredit-mode-map (kbd "s-t") #'transpose-sexps)
(define-key paredit-mode-map (kbd "s-n") #'paredit-forward-up)

;; Mark-sexp is also very useful but tricky to type.
(define-key paredit-mode-map (kbd "M-SPC") #'mark-sexp)

(use-package highlight-quoted
  :init

  
  ;; Ensure pressing q closes edebug, macrostep and magit-blame.
  (setq lispy-compat '(edebug macrostep magit-blame-mode)))

;; Work around https://github.com/abo-abo/lispy/issues/283
(remove-hook 'python-mode-hook #'wisent-python-default-setup)

(defun wh/elisp-imenu-reset ()
  (setq imenu-create-index-function #'imenu-default-create-index-function))
