2016-10-13 14:50:22 +02:00
|
|
|
#+TITLE: PHP
|
|
|
|
|
|
|
|
Turn on electric pairing in php-mode.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'php-mode-hook 'electric-pair-local-mode)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Turn on electric indenting in php-mode.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'php-mode-hook 'electric-indent-local-mode)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Enable flycheck in php-mode.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'php-mode-hook 'flycheck-mode)
|
|
|
|
#+END_SRC
|
2016-10-14 00:58:05 +02:00
|
|
|
|
|
|
|
Reset =require-final-newline= because the default php-mode style
|
|
|
|
disables it.
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(defun oni:set-require-final-newline ()
|
|
|
|
(setq require-final-newline t))
|
|
|
|
|
|
|
|
(add-hook 'php-mode-hook 'oni:set-require-final-newline)
|
|
|
|
#+END_SRC
|