问题
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:
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 '
.
来源:https://stackoverflow.com/questions/62031589/how-to-automatically-enable-paredit-mode-on-all-clojure-closurescript-and-elisp