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

江枫思渺然 提交于 2021-02-11 14:14:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!