How to automatically enable paredit mode on all clojure, closurescript and elisp buffers automatically?

1k Views Asked by At

I want to enable paredit-mode on all clojure, cljs and elisp buffers by default, which is probably going to happen through the .spacemacs file. This is what I have so far in the user-config function of my .spacemacs:


;; paredit autoload
  (autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
  (add-hook 'clojure-mode #'enable-paredit-mode)
  (add-hook 'clojurescript-mode #'enable-paredit-mode)

But it doesn't really work. What am I doing wrong?

1

There are 1 best solutions below

4
Gwang-Jin Kim On

In the paredit-mode wiki one can see it should be:

;; paredit autoload
  (autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
  (add-hook 'clojure-mode 'enable-paredit-mode)
  (add-hook 'clojurescript-mode 'enable-paredit-mode)

So not #' but instead of that '.