Set fill-mode to 80 by default.
This commit is contained in:
parent
f21dfed32a
commit
d3f580df62
17
init.el
17
init.el
|
@ -1,5 +1,5 @@
|
|||
;;; init.el --- tastytea's Emacs init file.
|
||||
;; Time-stamp: <2019-08-02T18:35:50+00:00>
|
||||
;; Time-stamp: <2019-08-03T10:37:32+00:00>
|
||||
|
||||
;;; Commentary:
|
||||
;; I am using this file with Emacs 26, but most of it will probably work with
|
||||
|
@ -104,14 +104,11 @@
|
|||
(initial-major-mode 'markdown-mode) ; and select mode.
|
||||
(require-final-newline t) ; Always add newline at end of file.
|
||||
(recentf-max-saved-items 40) ; Keep this number of buffers in history.
|
||||
(fill-column . 80) ; Documents are 80 chars wide by default.
|
||||
|
||||
:config
|
||||
(defalias 'yes-or-no-p 'y-or-n-p) ; Just type y/n instead of yes/no.
|
||||
|
||||
(defun my/set-fill-column-80 ()
|
||||
"Set fill-column to 80."
|
||||
(set-fill-column 80))
|
||||
|
||||
(defun my/set-fill-column-100 ()
|
||||
"Set fill-column to 100."
|
||||
(set-fill-column 100))
|
||||
|
@ -159,8 +156,6 @@
|
|||
(set-frame-parameter nil 'buffer-predicate 'my/buffer-predicate)
|
||||
|
||||
:hook
|
||||
(prog-mode . my/set-fill-column-80)
|
||||
(conf-mode . my/set-fill-column-80)
|
||||
(text-mode . auto-fill-mode)) ; Enable word-wrapping at fill-column.
|
||||
|
||||
;; Save cursor position.
|
||||
|
@ -905,11 +900,11 @@ With argument, do this that many times."
|
|||
(markup-verbatim-face ((t (:background "gray5"))))
|
||||
:hook
|
||||
(adoc-mode . auto-fill-mode) ; Wrap at fill-column.
|
||||
(adoc-mode . my/set-fill-column-80)
|
||||
(adoc-mode . (lambda () ; Automatically update date.
|
||||
(setq-local time-stamp-pattern
|
||||
"8/:[dD[aA][tT][eE]: +%:y-%02m-%02d\n")
|
||||
(setq-local time-stamp-time-zone nil)))
|
||||
;; (setq-local time-stamp-time-zone nil) ; Set to local TZ.
|
||||
))
|
||||
)
|
||||
|
||||
(use-package markdown-mode
|
||||
|
@ -936,7 +931,6 @@ With argument, do this that many times."
|
|||
("\\.md\\'" . markdown-mode)
|
||||
("\\.markdown\\'" . markdown-mode))
|
||||
:hook
|
||||
(markdown-mode . my/set-fill-column-80)
|
||||
(markdown-mode . auto-fill-mode)) ; Wrap at fill-column.
|
||||
|
||||
(use-package crontab-mode
|
||||
|
@ -968,8 +962,7 @@ With argument, do this that many times."
|
|||
(use-package yaml-mode
|
||||
:mode
|
||||
("\\.yml\\'" . yaml-mode)
|
||||
:hook
|
||||
(yaml-mode . my/set-fill-column-80))
|
||||
)
|
||||
|
||||
(use-package mediawiki)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user