;ark only end of overly long lines.

This commit is contained in:
tastytea 2019-07-29 15:02:28 +02:00
parent fbd518c534
commit 8143ece097
1 changed files with 18 additions and 9 deletions

27
init.el
View File

@ -1,5 +1,5 @@
;;; init.el --- tastytea's Emacs init file.
;; Time-stamp: <2019-07-29T12:17:18+00:00>
;; Time-stamp: <2019-07-29T13:00:38+00:00>
;;; Commentary:
;; I am using this file with Emacs 26, but most of it will probably work with
@ -611,7 +611,8 @@ With argument, do this that many times."
;; (whitespace-line-column nil) ; Set to fill-column.
:config
(delete 'newline-mark whitespace-style) ; Don't paint $ at eol.
;; (delete 'lines whitespace-style) ; Don't mark overly long lines.
(delete 'lines whitespace-style) ; Don't mark whole overly long lines.
(add-to-list 'whitespace-style 'lines-tail) ; Mark end of overly long lines.
;; Workaround to not show dots in popup menus.
(defun my/whitespace-mode-enabled-p ()
(symbol-value 'whitespace-mode))
@ -637,6 +638,21 @@ With argument, do this that many times."
"Restore whitespace-mode when all popups have closed."
(if my/ws-enabled
(whitespace-mode t)))
(if (display-graphic-p)
(custom-set-faces
'(whitespace-line ((t (:inherit whitespace-line
:weight normal
:foreground nil
:background nil
:box (:line-width 1 :color "dark red")
)))))
(custom-set-faces ; else
'(whitespace-line ((t (:inherit whitespace-line
:background nil
:underline t
)))))
)
:bind
("C-x w" . whitespace-mode)
:hook
@ -652,13 +668,6 @@ With argument, do this that many times."
))
:custom-face
(whitespace-space ((nil :foreground "gray18")))
(whitespace-line ((nil :inherit whitespace-line
:weight normal
:foreground nil
:background nil
:distant-foreground "red" ; Make dots red.
;; :box (:line-width 1 :color "dark red")
)))
)
;; Spell checking.