summaryrefslogtreecommitdiff
path: root/lisp/text.el
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2023-01-27 08:41:19 -0500
committermattkae <mattkae@protonmail.com>2023-01-27 08:41:19 -0500
commit8b5874e9acb48f7b3b414b4556762c1835ee4c5d (patch)
tree5e8ecef40befa48117ccbda70537dbc72fe0d947 /lisp/text.el
parent71b04518343e93ffea363dbe8996699f580dcfb4 (diff)
Increasing font size, and fixing a bug where all modes were using perfect-margin-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)