aboutsummaryrefslogtreecommitdiffstats
path: root/oni-makefile.el
diff options
context:
space:
mode:
Diffstat (limited to 'oni-makefile.el')
-rw-r--r--oni-makefile.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/oni-makefile.el b/oni-makefile.el
index 418976e..74815ed 100644
--- a/oni-makefile.el
+++ b/oni-makefile.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2019.0904.210656
+;; Version: 2019.1210.231019
;; Package-Requires: (oni-fci)
;; This program is free software; you can redistribute it and/or modify
@@ -33,9 +33,15 @@
(setq-local whitespace-style '(face tabs))
(whitespace-mode))
+(defun oni-makefile--auto-fill-mode ()
+ "Enable ‘auto-fill-mode’ only for comments."
+ (setq-local comment-auto-fill-only-comments t)
+ (auto-fill-mode))
+
(add-hook 'makefile-mode-hook #'oni-makefile--whitespace-mode)
(add-hook 'makefile-mode-hook 'electric-pair-local-mode)
(add-hook 'makefile-mode-hook 'fci-mode)
+(add-hook 'makefile-mode-hook 'oni-makefile--auto-fill-mode)
;;;###autoload(with-eval-after-load 'make-mode (require 'oni-makefile))