Coupla small changes

This commit is contained in:
Case Duckworth 2022-01-12 17:40:43 -06:00
parent 2a119625e6
commit 125a82251c
3 changed files with 46 additions and 42 deletions

View File

@ -76,31 +76,34 @@ See `no-littering' for examples.")
;;; Fonts
(progn
;; Set default faces
(let ((font-name system-default-font)
(font-size system-default-height)
(variable-font-name system-variable-pitch-font)
(variable-font-size system-variable-pitch-height))
(set-face-attribute 'default nil :family system-default-font
:height font-size :weight 'book)
(set-face-attribute 'italic nil :family font-name
:height font-size :slant 'italic)
(set-face-attribute 'variable-pitch nil :family variable-font-name
:height variable-font-size))
;; Set default faces
(+with-message "Setting default faces"
(let ((font-name system-default-font)
(font-size system-default-height)
(variable-font-name system-variable-pitch-font)
(variable-font-size system-variable-pitch-height))
(set-face-attribute 'default nil :family system-default-font
:height font-size :weight 'book)
(set-face-attribute 'italic nil :family font-name
:height font-size :slant 'italic)
(set-face-attribute 'variable-pitch nil :family variable-font-name
:height variable-font-size)))
;; Emoji fonts
(let ((ffl (font-family-list)))
(dolist (font '("Noto Color Emoji"
"Noto Emoji"
"Segoe UI Emoji"
"Apple Color Emoji"
"FreeSans"
"FreeMono"
"FreeSerif"
"Unifont"
"Symbola"))
(when (member font ffl)
(set-fontset-font t 'symbol (font-spec :family font) nil :append)))))
;; Emoji fonts
(+with-message "Adding emoji fonts"
(let ((ffl (font-family-list)))
(dolist (font '("Noto Color Emoji"
"Noto Emoji"
"Segoe UI Emoji"
"Apple Color Emoji"
"FreeSans"
"FreeMono"
"FreeSerif"
"Unifont"
"Symbola"))
(when (member font ffl)
(message "Found font: %s" font)
(set-fontset-font t 'symbol (font-spec :family font) nil :append))))))
;;; Packages
@ -118,21 +121,22 @@ See `no-littering' for examples.")
;; Bootstrap straight.el
;; https://github.com/raxod502/straight.el
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
"straight/repos/straight.el/bootstrap.el"
straight-base-dir))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
(concat "https://raw.githubusercontent.com/"
"raxod502/straight.el/develop/install.el")
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(+with-message "Bootstrapping straight"
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
"straight/repos/straight.el/bootstrap.el"
straight-base-dir))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
(concat "https://raw.githubusercontent.com/"
"raxod502/straight.el/develop/install.el")
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage)))
;; Early-loaded packages -- those that, for some reason or another,
;; need to be ensured to be loaded first.

View File

@ -1266,9 +1266,11 @@ See also `crux-reopen-as-root-mode'."
)
(setup (:straight org-visibility)
;; I think this is causing hangups on Windows .. ?
(:option org-visibility-state-file (.etc "org-visibility")
org-visibility-include-regexps '("\\.org\\'"))
(org-visibility-enable-hooks))
;; (org-visibility-enable-hooks)
)
(setup (:straight orglink)
(global-orglink-mode +1))

View File

@ -58,9 +58,7 @@ FUNC should be a function with the signature (THING REMEMBERED-SETTING)."
;;;###autoload
(define-minor-mode reading-mode
"A mode for reading."
:init-value nil
:lighter " Read"
:keymap (make-sparse-keymap)
(if reading-mode
;; turn on
(progn