Skip to content

Commit

Permalink
tweak(core): fallback to a builtin theme if minemacs-theme fails
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Apr 15, 2023
1 parent 24e03db commit 48b0b62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion elisp/+minemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ If NO-MESSAGE-LOG is non-nil, do not print any message to *Messages* buffer."
(interactive)
(when minemacs-theme
(+log! "Loading user theme: %s" minemacs-theme)
(load-theme minemacs-theme t))
;; Fallback to built-in `tsdh-light' when `minemacs-theme' is not available.
(unless (ignore-errors (load-theme minemacs-theme t))
(+error! "Cannot load theme \"%s\", falling back to \"tsdh-light\"." minemacs-theme)
(load-theme 'tsdh-light t)))
;; Run hooks
(run-hooks 'minemacs-after-load-theme-hook))

Expand Down

0 comments on commit 48b0b62

Please sign in to comment.