diff options
author | David Morgan <djm_uk@protonmail.com> | 2024-12-13 13:46:46 +0000 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2024-12-13 13:46:46 +0000 |
commit | d0e51811a4ae029c420683baabcdb0c2746008d2 (patch) | |
tree | d54b902207e852df99a875c00ac06347e6bcde45 /.emacs.d | |
parent | ac04afe0e8789c271d3fd065e112249fcfb6c9de (diff) | |
download | dotfiles-d0e51811a4ae029c420683baabcdb0c2746008d2.tar.gz |
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/lisp/init-completion.el | 12 |
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)) |