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?
-- EDIT -- I've tried
;; paredit autoload
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(add-hook 'clojure-mode-hook 'enable-paredit-mode)
(add-hook 'clojurescript-mode-hook 'enable-paredit-mode)
and
;; paredit autoload
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(add-hook 'clojure-mode-hook #'enable-paredit-mode)
(add-hook 'clojurescript-mode-hook #'enable-paredit-mode)
and neither works.
-- EDIT --
The value of clojure-mode-hook is:
(#f(compiled-function
()
#<bytecode 0x464d0c01>)
(lambda nil
(set
(make-local-variable 'sesman-system)
'CIDER))
clojure--check-wrong-major-mode clj-refactor-mode cider-mode spacemacs//init-jump-handlers-clojure-mode)
clojure-mode-hook
. Maybe you need to wrap those in aneval-after-load
. Do you have any evidence that the code you’ve written actually runs?C-x C-e
to interactively evaluate expressions as you go, andC-h v
to check the value of variables.