summaryrefslogtreecommitdiff
path: root/lisp/text.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/text.el')
-rw-r--r--lisp/text.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/text.el b/lisp/text.el
index 835f04d..fd43fbd 100644
--- a/lisp/text.el
+++ b/lisp/text.el
@@ -11,10 +11,16 @@
(display-line-numbers-mode -1)
)
+(defun my-perfect-margin-mode-hook()
+ (when (and (stringp buffer-file-name)
+ (string-match "\\.txt\\'" buffer-file-name))
+ (perfect-margin-mode 1))
+ )
+
(use-package perfect-margin
:ensure t
:config
- (add-hook 'text-mode-hook 'perfect-margin-mode))
+ (add-hook 'text-mode-hook 'my-perfect-margin-mode-hook))
(add-hook 'text-mode-hook 'setup-text-mode)
(require 'ispell)