From 809285f90adefd169128112264896641709f1cc2 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 18 Jan 2014 19:38:44 -0500 Subject: Advise hippie expand to work with paredit --- init/00-km-general.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'init') diff --git a/init/00-km-general.el b/init/00-km-general.el index 1b21c2b..bf4ce0e 100644 --- a/init/00-km-general.el +++ b/init/00-km-general.el @@ -70,6 +70,11 @@ (setq ispell-program-name "aspell") (global-set-key (kbd "M-/") 'hippie-expand) +;; http://www.emacswiki.org/emacs/HippieExpand#toc9 +(defadvice he-substitute-string (after he-paredit-fix activate) + "Remove extra paren when expanding line in paredit." + (if (and paredit-mode (equal (substring str -1) ")")) + (progn (backward-delete-char 1) (forward-char)))) (setq sentence-end-double-space nil) -- cgit v1.2.3