From e53becab23aeae58b4d156f9d45428342c15a4b1 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 21 May 2015 01:47:40 -0400 Subject: Go back to Paredit This reverts commit ad8a9a3d94c3553d59e3d4ad2b99580d8d395c21 and e158f7f14b061eb731ea44ddac1f09f1008380de. --- lisp/init-editing.el | 6 +----- lisp/init-elisp.el | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/init-editing.el b/lisp/init-editing.el index e36d351..367f3b3 100644 --- a/lisp/init-editing.el +++ b/lisp/init-editing.el @@ -14,9 +14,6 @@ (setq flyspell-auto-correct-binding (kbd "C-c e ;")) -;; This is bound separately in `km/editing-map'. -(setq iedit-toggle-key-default nil) - ;; http://www.emacswiki.org/emacs/UnfillParagraph (defun km/unfill-paragraph () "Convert a multi-line paragraph to a single line of text." @@ -176,9 +173,8 @@ touches." (define-prefix-command 'km/editing-map) (global-set-key (kbd "C-c e") 'km/editing-map) -(define-key km/editing-map (kbd "C-i") 'indent-relative) (define-key km/editing-map "f" 'km/fill-surrounding-indented) -(define-key km/editing-map "i" 'iedit-mode) +(define-key km/editing-map "i" 'indent-relative) (electric-indent-mode -1) (electric-pair-mode 1) diff --git a/lisp/init-elisp.el b/lisp/init-elisp.el index a6cee16..8ec711d 100644 --- a/lisp/init-elisp.el +++ b/lisp/init-elisp.el @@ -1,4 +1,18 @@ -(add-hook 'emacs-lisp-mode-hook 'lispy-mode) +(autoload 'enable-paredit-mode "paredit" + "Turn on pseudo-structural editing of Lisp code." + t) + +(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode) + +(after 'paredit + (define-key paredit-mode-map (kbd "C-,") 'paredit-forward-slurp-sexp) + (define-key paredit-mode-map (kbd "C-.") 'paredit-forward-barf-sexp) + (define-key paredit-mode-map (kbd "C-M-,") 'paredit-backward-slurp-sexp) + (define-key paredit-mode-map (kbd "C-M-.") 'paredit-backward-barf-sexp) + + ;; Don't let `paredit-splice-sexp' override default 'M-s' map. + (define-key paredit-mode-map (kbd "M-s") nil) + (define-key paredit-mode-map (kbd "M-p") 'paredit-splice-sexp)) (provide 'init-elisp) -- cgit v1.2.3