From da3eb9202a5b0e86ed15d46bb9f37f606aabf0cc Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 17 May 2020 19:33:54 +0200 Subject: [PATCH] Emacs: Ignore emacs --daemon, it has a lot of problems. --- init.d/basics/appearance.el | 10 ++++----- init.d/text/common.el | 43 ++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/init.d/basics/appearance.el b/init.d/basics/appearance.el index 8827f68..6cc203d 100644 --- a/init.d/basics/appearance.el +++ b/init.d/basics/appearance.el @@ -1,6 +1,6 @@ ;;; appearance.el --- Configure appearance. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-05-17T18:15:55+0200> +;; Time-stamp: <2020-05-17T19:21:27+0200> ;;; Commentary: @@ -62,10 +62,9 @@ (load-theme 'doom-outrun-electric t) (doom-themes-visual-bell-config) ; Flash modeline on error. (doom-themes-treemacs-config) - (defun my/theme-modifications-scroll-bar () - ;; Set colors for scroll bar. - (set-face-background 'scroll-bar (face-background 'default)) - (set-face-foreground 'scroll-bar (face-foreground 'shadow))) + + (set-face-background 'scroll-bar (face-background 'default)) + (set-face-foreground 'scroll-bar (face-foreground 'shadow))) ;; Write a minimal theme to file, to load it in early-init.el. (unless (string= (face-background 'default) "unspecified-bg") @@ -80,7 +79,6 @@ (with-temp-file (expand-file-name "early-theme.el" user-emacs-directory) (insert minimal-theme))))) - :hook (server-after-make-frame . my/theme-modifications-scroll-bar)) ) ; unless slow-computer. ;; Neat modeline. diff --git a/init.d/text/common.el b/init.d/text/common.el index 6c4bf47..4090c51 100644 --- a/init.d/text/common.el +++ b/init.d/text/common.el @@ -1,6 +1,6 @@ ;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-05-17T18:17:00+0200> +;; Time-stamp: <2020-05-17T19:23:12+0200> ;;; Commentary: @@ -40,34 +40,33 @@ ;; Ruler with fill-column marker. (use-package ruler-mode :config (progn - (defun my/theme-modifications-ruler () - (set-face-background 'ruler-mode-default - (face-foreground 'line-number)) - (set-face-foreground 'ruler-mode-default - (face-background 'default)) - (set-face-foreground 'ruler-mode-column-number - (face-background 'default)) - (if (and (window-system) - (>= emacs-major-version 27)) - (set-face-foreground 'ruler-mode-fill-column - (face-foreground 'fill-column-indicator - nil t)) + (set-face-background 'ruler-mode-default + (face-foreground 'line-number)) + (set-face-foreground 'ruler-mode-default + (face-background 'default)) + (set-face-foreground 'ruler-mode-column-number + (face-background 'default)) + (if (and (window-system) + (>= emacs-major-version 27)) (set-face-foreground 'ruler-mode-fill-column - (face-foreground 'shadow))) - (set-face-foreground 'ruler-mode-comment-column - (face-foreground 'ruler-mode-fill-column)) - (set-face-foreground 'ruler-mode-goal-column - (face-foreground 'ruler-mode-fill-column)) - (set-face-foreground 'ruler-mode-current-column - (face-foreground 'line-number-current-line))) + (face-foreground + 'fill-column-indicator nil t)) + (set-face-foreground 'ruler-mode-fill-column + (face-foreground 'shadow))) + (set-face-foreground 'ruler-mode-comment-column + (face-foreground 'ruler-mode-fill-column)) + (set-face-foreground 'ruler-mode-goal-column + (face-foreground 'ruler-mode-fill-column)) + (set-face-foreground 'ruler-mode-current-column + (face-foreground 'line-number-current-line)) + (defun my/ruler-on () "Turn `ruler-mode' on." (ruler-mode 1))) :custom-face (ruler-mode-default ((t (:inherit·default :box·nil)))) :hook ((find-file . my/ruler-on) - (text-mode . my/ruler-on) ; For the scratch buffer. - (server-after-make-frame . my/theme-modifications-ruler))) + (text-mode . my/ruler-on))) ; For the scratch buffer. ;; Show a fill-column indicator vertically across the buffer. (when (>= emacs-major-version 27)