aboutsummaryrefslogtreecommitdiffstats
path: root/oni-haml/oni-haml.el
diff options
context:
space:
mode:
Diffstat (limited to 'oni-haml/oni-haml.el')
-rw-r--r--oni-haml/oni-haml.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/oni-haml/oni-haml.el b/oni-haml/oni-haml.el
index 00a88d7..c184f1a 100644
--- a/oni-haml/oni-haml.el
+++ b/oni-haml/oni-haml.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2019.0904.210605
+;; Version: 2019.1210.225414
;; Package-Requires: (oni-yasnippet)
;; This program is free software; you can redistribute it and/or modify
@@ -45,6 +45,13 @@
(add-to-list 'yas-snippet-dirs oni-haml-snippets-dir t))
(yas-load-directory oni-haml-snippets-dir))
+(defun oni-haml--auto-fill-mode ()
+ "Enable ‘auto-fill-mode’ only for comments."
+ (setq-local comment-auto-fill-only-comments t)
+ (auto-fill-mode))
+
+(add-hook 'haml-mode-hook 'oni-haml--auto-fill-mode)
+
;;;autoload
(with-eval-after-load 'haml-mode
(with-eval-after-load 'yasnippet