|
@@ -353,7 +353,6 @@ found, otherwise returns nil." |
|
|
|
|
|
|
|
|
;; Basically it should not set globally (instead use something like file local |
|
|
;; Basically it should not set globally (instead use something like file local |
|
|
;; variables or editorconfig), but for most cases I just need this... |
|
|
;; variables or editorconfig), but for most cases I just need this... |
|
|
(setq-default require-final-newline t) |
|
|
|
|
|
(defun my-set-require-final-newline () |
|
|
(defun my-set-require-final-newline () |
|
|
"Set `require-final-newline'." |
|
|
"Set `require-final-newline'." |
|
|
(set (make-local-variable 'require-final-newline) |
|
|
(set (make-local-variable 'require-final-newline) |
|
@@ -361,6 +360,8 @@ found, otherwise returns nil." |
|
|
|
|
|
|
|
|
(add-hook 'prog-mode-hook |
|
|
(add-hook 'prog-mode-hook |
|
|
'my-set-require-final-newline) |
|
|
'my-set-require-final-newline) |
|
|
|
|
|
(add-hook 'text-mode-hook |
|
|
|
|
|
'my-set-require-final-newline) |
|
|
(add-hook 'conf-mode-hook |
|
|
(add-hook 'conf-mode-hook |
|
|
'my-set-require-final-newline) |
|
|
'my-set-require-final-newline) |
|
|
|
|
|
|
|
|