Add some smartparens customization

This commit is contained in:
Tom Willemse 2013-04-30 20:06:29 +02:00
parent ba09f37955
commit 3e63768e7b

View file

@ -1253,7 +1253,7 @@
(setq jabber-roster-show-bindings nil) (setq jabber-roster-show-bindings nil)
#+END_SRC #+END_SRC
* Defer font locking a little * Defer font locking a little :fontlock:
By deferring font-lock for a very short time it should improve By deferring font-lock for a very short time it should improve
scrolling performance. scrolling performance.
@ -1262,7 +1262,7 @@
(setq jit-lock-defer-time 0.2) (setq jit-lock-defer-time 0.2)
#+END_SRC #+END_SRC
* Turn on compilation-shell-minor-mode for pony buffers * Turn on compilation-shell-minor-mode for pony buffers :pony:
Turn on =compilation-shell-minor-mode= whenever =pony-minor-mode= starts Turn on =compilation-shell-minor-mode= whenever =pony-minor-mode= starts
in a =comint-mode= buffer. Since buffers like ~*ponymanage*~ and in a =comint-mode= buffer. Since buffers like ~*ponymanage*~ and
@ -1280,6 +1280,22 @@
(add-hook 'comint-mode-hook 'turn-on-compilation-shell-for-pony) (add-hook 'comint-mode-hook 'turn-on-compilation-shell-for-pony)
#+END_SRC #+END_SRC
* Make smartparens a little stricter :smartparens:
Set the delete and backspace keys to some smartparens keybindings
that should make pair balancing a little stricter. These key
bindings refuse to delete pair delimeters or skip over them if they
still have content.
#+BEGIN_SRC emacs-lisp
(defun oni:smartparens-set-keys ()
(local-set-key (kbd "DEL") 'sp-backward-delete-char)
(local-set-key (kbd "<deletechar>") 'sp-delete-char)
(local-set-key (kbd "C-d") 'sp-delete-char))
(add-hook 'smartparens-mode-on-hook 'oni:smartparens-set-keys)
#+END_SRC
* All the rest * All the rest
This still needs to be sorted out and documented, haven't had time This still needs to be sorted out and documented, haven't had time