Set fill-column to 80 for prog-mode.

This commit is contained in:
tastytea 2019-03-23 05:57:55 +01:00
parent 4097004720
commit 5c96c59867
2 changed files with 8 additions and 10 deletions

16
init.el
View File

@ -1,5 +1,5 @@
;;; init.el --- tastytea's Emacs init file.
;;; Time-stamp: <2019-03-23 04:48:18 CET>
;;; Time-stamp: <2019-03-23 05:57:53 CET>
;;; Commentary:
;;; I am using this file with Emacs 26, but most of it will probably work with
@ -388,12 +388,11 @@
;; Draw line in column 80
(use-package fill-column-indicator
:after company
:init
(defun my/set-fill-column-80 ()
"Set fill-column to 80."
(set-fill-column 80))
:config
;; ;; TODO: Find out why I can't put this in :init or :config.
;; (define-globalized-minor-mode global-fci-mode fci-mode
;; (lambda () (fci-mode t)))
;; (global-fci-mode t)
;; Fix bug with fci + company.
(defun my/on-off-fci-before-company(command)
(when (string= "show" command)
@ -402,10 +401,9 @@
(turn-on-fci-mode)))
(advice-add 'company-call-frontends :before #'my/on-off-fci-before-company)
:hook
(prog-mode . my/set-fill-column-80)
(prog-mode . fci-mode)
(text-mode . fci-mode)
:custom
(fci-rule-column 80))
(text-mode . fci-mode))
;; Interactive substring matching.
(use-package ido

View File

@ -1,2 +1,2 @@
127.0.0.1:51313 26837
127.0.0.1:51313 1707
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh