From 6e1dace32b53cf7997e21d292ec126de4ea93e82 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 20 Apr 2015 01:03:18 +0200 Subject: [PATCH] Remove unnecessary custom minor mode --- emacs/.emacs.d/init.org | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 2ff4733..ac0843b 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1042,30 +1042,6 @@ (local-unset-key (kbd "RET"))))) #+END_SRC -* Local minor mode for =electric-pair-mode= - - Almost all modes benefit from automatic delimiter pairing, but not - all modes are equal. =paredit= works awesomely for anything lisp-like, - but not so much for other modes, that's where =electric-pair-mode= - comes in. Unfortunately it has no local version, so I copied the - code from =electric-indent-local-mode= and changed it work with - =electric-pair-mode=. - - #+BEGIN_SRC emacs-lisp - ;; Copied from electric.el, modified from `electric-indent-local-mode'. - (define-minor-mode oni:electric-pair-local-mode - "Toggle `electric-pair-mode' only in this buffer." - :variable (buffer-local-value 'electric-pair-mode (current-buffer)) - (cond - ((eq electric-pair-mode (default-value 'electric-pair-mode)) - (kill-local-variable 'electric-pair-mode)) - ((not (default-value 'electric-pair-mode)) - ;; Locally enabled, but globally disabled. - (electric-pair-mode 1) ; Setup the hooks. - (setq-default electric-pair-mode nil) ; But keep it globally disabled. - ))) - #+END_SRC - * Remove whitespace when closing delimiters In =electric-pair-mode=, skip over and delete white space if it stands