From 467bc0ce990bfc37c1e7a53d3d0cbfbca8e50876 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Wed, 8 May 2019 23:10:54 +0900 Subject: [PATCH] Remove global and add text-mode --- emacs.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index 1c44e24..7e59a76 100644 --- a/emacs.el +++ b/emacs.el @@ -353,7 +353,6 @@ found, otherwise returns nil." ;; Basically it should not set globally (instead use something like file local ;; variables or editorconfig), but for most cases I just need this... -(setq-default require-final-newline t) (defun my-set-require-final-newline () "Set `require-final-newline'." (set (make-local-variable 'require-final-newline) @@ -361,6 +360,8 @@ found, otherwise returns nil." (add-hook 'prog-mode-hook 'my-set-require-final-newline) +(add-hook 'text-mode-hook + 'my-set-require-final-newline) (add-hook 'conf-mode-hook 'my-set-require-final-newline)