about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2023-06-08 06:58:45 +0100
committerDavid Morgan <djm_uk@protonmail.com>2023-06-08 06:58:45 +0100
commit0f41457237fd4dd6931f224ffa397b2637a34367 (patch)
treea6d1e221ad17f1e05e88ebac584247fa0c946a16
parent1d63d2e821e893dfc9b4b19e66222fe3d82ce2ea (diff)
downloaddotfiles-0f41457237fd4dd6931f224ffa397b2637a34367.tar.gz
Fix Clojure subword-mode setup
-rw-r--r--.emacs.d/lisp/init-clojure.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-clojure.el b/.emacs.d/lisp/init-clojure.el
index d585d35..8dd1bf1 100644
--- a/.emacs.d/lisp/init-clojure.el
+++ b/.emacs.d/lisp/init-clojure.el
@@ -12,7 +12,6 @@
 (use-package clojure-mode
   :config
   (require 'flycheck-clj-kondo)
-  (subword-mode +1)
   (define-abbrev-table 'clojure-mode-abbrev-table
     '(("scs" "#sc/spy")
       ("scp" "#spy/p")
@@ -27,6 +26,10 @@
   (defun set-clojure-capf ()
     (add-hook 'completion-at-point-functions #'cape-clojure -99 t))
 
+  (defun clojure-mode-hook-fn ()
+    (set-clojure-capf)
+    (subword-mode +1))
+
   ;; https://github.com/weavejester/compojure/wiki/Emacs-indentation
   (define-clojure-indent
     (defroutes 'defun)
@@ -54,7 +57,7 @@
   (advice-add 'uniquify-get-proposed-name :around 'clj-uniquify-get-proposed-name)
 
   :hook
-  (clojure-mode . set-clojure-capf))
+  (clojure-mode . clojure-mode-hook-fn))
 
 (use-package clj-refactor
   :diminish