From e18deb8049ed458ce2423b711975c51b6267aa3a Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 26 Dec 2019 08:44:59 +0100 Subject: [PATCH] Emacs: Show fill-column indicator if ruler is shown. --- init/text/common.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/init/text/common.el b/init/text/common.el index cd18c86..d79336b 100644 --- a/init/text/common.el +++ b/init/text/common.el @@ -1,6 +1,6 @@ ;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*- -;; Time-stamp: <2019-12-23T02:48:05+00:00> +;; Time-stamp: <2019-12-26T07:41:24+00:00> ;;; Commentary: @@ -33,8 +33,12 @@ :config (defun my/ruler-on () - "Turn ruler on." + "Turn `ruler-mode' on." (ruler-mode 1) + + ;; Show a fill-column indicator vertically across the buffer. + (when (>= emacs-major-version 27) + (display-fill-column-indicator-mode)) ) :custom-face @@ -197,7 +201,8 @@ :config (delete 'newline-mark whitespace-style) ; Don't paint $ at eol. (delete 'lines whitespace-style) ; Don't mark whole overly long lines. - (add-to-list 'whitespace-style 'lines-tail) ; Mark end of overly long lines. + (when (< emacs-major-version 27) ; Mark end of overly long lines. + (add-to-list 'whitespace-style 'lines-tail)) ;; Workaround to not show dots in popup menus. (defun my/whitespace-mode-enabled-p ()