Browse Source

Add my-set-require-final-newline

master
10sr 5 years ago
parent
commit
70fe675277
Signed by: 10sr GPG Key ID: C384BB17CBB19347
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      emacs.el

+ 9
- 0
emacs.el View File

@@ -352,6 +352,15 @@ 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) (setq-default require-final-newline t)
(defun my-set-require-final-newline ()
"Set `require-final-newline'."
(set (make-local-variable 'require-final-newline)
mode-require-final-newline))

(add-hook 'prog-mode-hook
'my-set-require-final-newline)
(add-hook 'conf-mode-hook
'my-set-require-final-newline)


;; Used from term-cursor ;; Used from term-cursor
;; hbar is too hard to find... ;; hbar is too hard to find...


Loading…
Cancel
Save