* .emacs.d/init.el (b/invert-default-face): Only invert the faces for the (selected...
[~bandali/configs] / .emacs.d / init.el
index 4183865..ae6afba 100644 (file)
@@ -436,9 +436,8 @@ Make N (default: 1) copies of the current line or region."
   "Invert the `default' face (swap its background and foreground).
 Effectively a very simple light/dark theme toggle switch."
   (interactive)
-  (invert-face 'default)
-  (when (display-graphic-p)
-    (invert-face 'mode-line)))
+  (invert-face 'default (selected-frame))
+  (invert-face 'mode-line (selected-frame)))
 
 (defun b/export-frame ()
   (interactive)
@@ -854,11 +853,10 @@ Effectively a very simple light/dark theme toggle switch."
 ;;    org-ref-bibliography-notes "~/usr/org/notes.org"
 ;;    org-ref-pdf-directory "~/usr/org/bibtex-pdfs/"))
 
-(when (featurep 'display-fill-column-indicator)
-  (run-with-idle-timer
-   0.2 nil #'require 'display-fill-column-indicator)
-  (with-eval-after-load 'display-fill-column-indicator
-    (global-display-fill-column-indicator-mode 1)))
+(run-with-idle-timer
+ 0.2 nil #'require 'display-fill-column-indicator nil 'noerror)
+(with-eval-after-load 'display-fill-column-indicator
+  (global-display-fill-column-indicator-mode 1))
 
 (with-eval-after-load 'window
   (setq split-width-threshold 150)