Use built-in electric-pair-local-mode
I wrote a patch to include it in Emacs itself.
This commit is contained in:
parent
b6fefcb3a5
commit
58bc48d227
2 changed files with 10 additions and 10 deletions
|
@ -1282,7 +1282,7 @@ from myaethon2.core.decorators import (
|
|||
(add-hook 'diary-display-hook 'oni:diary-display-func)
|
||||
(add-hook 'git-commit-mode-hook #'oni:set-ispell-local-en-dict)
|
||||
(add-hook 'haskell-mode-hook 'oni:haskell-mode-func)
|
||||
(add-hook 'java-mode-hook #'oni:electric-pair-local-mode)
|
||||
(add-hook 'java-mode-hook #'electric-pair-local-mode)
|
||||
(add-hook 'js-mode-hook #'moz-minor-mode)
|
||||
(add-hook 'outline-minor-mode-hook #'oni:set-tab-maybe-toggle-outline)
|
||||
(add-hook 'scheme-mode-hook (lambda () (setq ac-sources '(ac-source-geiser))))
|
||||
|
@ -1311,7 +1311,7 @@ from myaethon2.core.decorators import (
|
|||
'scheme-mode-hook)
|
||||
|
||||
(oni:add-hooks 'c-mode-hook
|
||||
#'oni:c-mode-func #'oni:electric-pair-local-mode)
|
||||
#'oni:c-mode-func #'electric-pair-local-mode)
|
||||
|
||||
(oni:add-hooks 'emacs-lisp-mode-hook
|
||||
(lambda ()
|
||||
|
@ -1352,14 +1352,14 @@ from myaethon2.core.decorators import (
|
|||
#'oni:reset-default-directory)
|
||||
|
||||
(oni:add-hooks 'js2-mode-hook
|
||||
#'tern-mode #'moz-minor-mode #'oni:electric-pair-local-mode)
|
||||
#'tern-mode #'moz-minor-mode #'electric-pair-local-mode)
|
||||
|
||||
(oni:add-hooks 'lisp-mode-hook
|
||||
(lambda () (setf ac-sources '(ac-source-slime-simple)))
|
||||
#'oni:set-emacs-lisp-symbols #'paredit-mode #'hl-sexp-mode)
|
||||
|
||||
(oni:add-hooks 'lua-mode-hook
|
||||
#'oni:lua-mode-func #'flycheck-mode #'oni:electric-pair-local-mode)
|
||||
#'oni:lua-mode-func #'flycheck-mode #'electric-pair-local-mode)
|
||||
|
||||
(oni:add-hooks 'markdown-mode-hook
|
||||
#'whitespace-mode #'oni:markdown-mode-func)
|
||||
|
@ -1375,7 +1375,7 @@ from myaethon2.core.decorators import (
|
|||
(lambda () (setq ac-sources '(ac-source-jedi-direct)))
|
||||
#'oni:set-python-symbols #'flycheck-mode #'whitespace-mode
|
||||
#'oni:python-mode-func #'oni:set-python-imenu-function
|
||||
#'jedi:setup #'subword-mode #'oni:electric-pair-local-mode)
|
||||
#'jedi:setup #'subword-mode #'electric-pair-local-mode)
|
||||
|
||||
(oni:add-hooks 'slime-repl-mode-hook
|
||||
#'paredit-mode #'set-up-slime-ac #'hl-sexp-mode)
|
||||
|
|
|
@ -1097,7 +1097,7 @@
|
|||
- Automatically match parentheses and other delimiters.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'scss-mode-hook #'oni:electric-pair-local-mode)
|
||||
(add-hook 'scss-mode-hook #'electric-pair-local-mode)
|
||||
#+END_SRC
|
||||
|
||||
- Automatically indent code.
|
||||
|
@ -1119,7 +1119,7 @@
|
|||
- Automatically match parentheses and other delimiters.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'haml-mode-hook #'oni:electric-pair-local-mode)
|
||||
(add-hook 'haml-mode-hook #'electric-pair-local-mode)
|
||||
#+END_SRC
|
||||
|
||||
- Check syntax on the fly
|
||||
|
@ -1135,7 +1135,7 @@
|
|||
- Automatically match parentheses and other delimiters.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'ruby-mode-hook #'oni:electric-pair-local-mode)
|
||||
(add-hook 'ruby-mode-hook #'electric-pair-local-mode)
|
||||
#+END_SRC
|
||||
|
||||
- Enable flycheck
|
||||
|
@ -1163,7 +1163,7 @@
|
|||
- Automatically match parentheses and other delimiters.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'coffee-mode-hook #'oni:electric-pair-local-mode)
|
||||
(add-hook 'coffee-mode-hook #'electric-pair-local-mode)
|
||||
#+END_SRC
|
||||
|
||||
** PHP
|
||||
|
@ -1255,7 +1255,7 @@
|
|||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'css-mode-hook #'electric-indent-local-mode)
|
||||
(add-hook 'css-mode-hook #'oni:electric-pair-local-mode)
|
||||
(add-hook 'css-mode-hook #'electric-pair-local-mode)
|
||||
#+END_SRC
|
||||
|
||||
* Load custom file
|
||||
|
|
Loading…
Reference in a new issue