about summary refs log tree commit diff stats
path: root/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/lisp/init-completion.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/.emacs.d/lisp/init-completion.el b/.emacs.d/lisp/init-completion.el
index f7e07de..36a5680 100644
--- a/.emacs.d/lisp/init-completion.el
+++ b/.emacs.d/lisp/init-completion.el
@@ -56,12 +56,12 @@
                                       try-expand-line
                                       try-complete-lisp-symbol-partially
                                       try-complete-lisp-symbol))
-  :config
-  ;; Modified from https://www.emacswiki.org/emacs/HippieExpand#h5o-9
-  (define-advice he-substitute-string (:after (str &optional trans-case) he-paredit-fix)
-    "Remove extra bracket when expanding line in paredit/smartparents mode."
-    (if (and (or smartparens-mode paredit-mode) (string-match "[]})]$" str))
-        (progn (backward-delete-char 1) (forward-char))))
+  :hook (elpaca-after-init . (lambda ()
+                               ;; Modified from https://www.emacswiki.org/emacs/HippieExpand#h5o-9
+                               (define-advice he-substitute-string (:after (str &optional trans-case) he-paredit-fix)
+                                 "Remove extra bracket when expanding line in paredit/smartparents mode."
+                                 (if (and (or smartparens-mode paredit-mode) (string-match "[]})]$" str))
+                                     (progn (backward-delete-char 1) (forward-char))))))
   :bind
   ("C-M-/" . hippie-expand))