From 355e08cf3bd8d1ef63baeb178dc51b82004a6216 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sun, 20 Nov 2022 19:16:52 -0800 Subject: feat(wpcarro/emacs): Define constants-osx? We need build-time branching and run-time branching to support OSX and Linux. Change-Id: Ie8de39f8ce34004d8fb3acf5bb5f2ba0b5f2e3d8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7316 Reviewed-by: wpcarro Autosubmit: wpcarro Tested-by: BuildkiteCI --- users/wpcarro/emacs/.emacs.d/wpc/constants.el | 5 ++++- users/wpcarro/emacs/.emacs.d/wpc/wpc-ui.el | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'users') diff --git a/users/wpcarro/emacs/.emacs.d/wpc/constants.el b/users/wpcarro/emacs/.emacs.d/wpc/constants.el index 69003f5955c4..48bcd9042f78 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/constants.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/constants.el @@ -20,7 +20,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defconst constants-ci? (maybe-some? (getenv "CI")) - "Encoded as t when Emacs is running in CI.") + "Defined as t when Emacs is running in CI.") + +(defconst constants-osx? (eq system-type 'darwin) + "Defined as t when OSX is running.") (provide 'constants) ;;; constants.el ends here diff --git a/users/wpcarro/emacs/.emacs.d/wpc/wpc-ui.el b/users/wpcarro/emacs/.emacs.d/wpc/wpc-ui.el index 02904e83a50d..656c819ee4c2 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/wpc-ui.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/wpc-ui.el @@ -166,7 +166,7 @@ (when window-system ;; On OSX, JetBrainsMono is installed as "JetBrains Mono", and I'm ;; not sure how to change that. - (let ((font (if (memq window-system '(ns)) "JetBrains Mono" "JetBrainsMono"))) + (let ((font (if constants-osx? "JetBrains Mono" "JetBrainsMono"))) (fonts-set font) ;; Some themes (e.g. doom-acario-*) change the font for comments. This ;; should prevent that. -- cgit 1.4.1