Prevent hippie expand line from unbalancing parens
This commit is contained in:
parent
46fddc3108
commit
486e27edd5
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue