浏览代码

Add my-set-require-final-newline

master
10sr 5 年前
父节点
当前提交
70fe675277
签署人:: 10sr GPG 密钥 ID: C384BB17CBB19347
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. +9
    -0
      emacs.el

+ 9
- 0
emacs.el 查看文件

@@ -352,6 +352,15 @@ 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)
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
;; hbar is too hard to find...


正在加载...
取消
保存