From d49cf1d7ffd0edfc47b2e7a6da0633dd4ec2b362 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 14 Oct 2016 00:58:05 +0200 Subject: [PATCH] Force requiring final newline in PHP mode --- emacs/.emacs.d/init/php-mode-init.org | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/emacs/.emacs.d/init/php-mode-init.org b/emacs/.emacs.d/init/php-mode-init.org index a8bbcb3..60bdb20 100644 --- a/emacs/.emacs.d/init/php-mode-init.org +++ b/emacs/.emacs.d/init/php-mode-init.org @@ -17,3 +17,13 @@ Enable flycheck in php-mode. #+BEGIN_SRC emacs-lisp (add-hook 'php-mode-hook 'flycheck-mode) #+END_SRC + +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