diff options
author | David Morgan <djm_uk@protonmail.com> | 2022-06-15 12:31:06 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2022-06-15 12:31:06 +0100 |
commit | 486e27edd50d7edcec4fbfc415cd8036004259d3 (patch) | |
tree | 779146db4a39dea6befcecdd6e530ac2bacc2095 /.emacs.d/lisp | |
parent | 46fddc3108f0f2acd8304d69b1235ac7564ba53e (diff) | |
download | dotfiles-486e27edd50d7edcec4fbfc415cd8036004259d3.tar.gz |
Prevent hippie expand line from unbalancing parens
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r-- | .emacs.d/lisp/init-completion.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-completion.el b/.emacs.d/lisp/init-completion.el index 7bc8ce4..6449aef 100644 --- a/.emacs.d/lisp/init-completion.el +++ b/.emacs.d/lisp/init-completion.el @@ -25,6 +25,12 @@ try-expand-line try-complete-lisp-symbol-partially try-complete-lisp-symbol)) + :config + ;; https://www.emacswiki.org/emacs/HippieExpand#h5o-9 + (defadvice he-substitute-string (after he-paredit-fix) + "Remove extra paren when expanding line in paredit." + (if (and paredit-mode (equal (substring str -1) ")")) + (progn (backward-delete-char 1) (forward-char)))) :bind ("C-M-/" . hippie-expand)) |