diff --git a/init.el b/init.el index 5f94b3e..847ecae 100644 --- a/init.el +++ b/init.el @@ -24,11 +24,10 @@ (package-install 'use-package)) ;; use-package -(eval-when-compile - (require 'use-package) - (setq use-package-always-ensure t - package-user-dir (expand-file-name "var/elpa" - user-emacs-directory))) +(require 'use-package) +(setq use-package-always-ensure t + package-user-dir (expand-file-name "var/elpa" + user-emacs-directory)) ;; no-littering (use-package no-littering @@ -2508,36 +2507,37 @@ current buffer is a Jupyter buffer, just use that." (upcase-initials (symbol-name mode)) (unless (zerop prec) (concat ": " (number-to-string prec)))))) - (doom-modeline-def-segment calc - "Display calculator icons and info." - (concat - (doom-modeline-spc) - (when-let ((icon (doom-modeline-icon 'faicon "nf-fa-calculator" "🖩" ""))) - (concat - (doom-modeline-display-icon icon) - (doom-modeline-vspc))) - (doom-modeline--buffer-simple-name) - (when (eq major-mode 'calc-mode) - (concat - (doom-modeline-spc) - (number-to-string calc-internal-prec) - (doom-modeline-spc) - (upcase-initials (symbol-name calc-angle-mode)) - (doom-modeline-spc) - (my/-calc-float-mode-string) - (when calc-prefer-frac - (concat - (doom-modeline-spc) - "Frac")) - (cond - (calc-algebraic-mode - (concat - (doom-modeline-spc) - "Alg")) - (calc-incomplete-algebraic-mode - (concat - (doom-modeline-spc) - "IAlg")))))))) + (with-eval-after-load 'doom-modeline + (doom-modeline-def-segment calc + "Display calculator icons and info." + (concat + (doom-modeline-spc) + (when-let ((icon (doom-modeline-icon 'faicon "nf-fa-calculator" "🖩" ""))) + (concat + (doom-modeline-display-icon icon) + (doom-modeline-vspc))) + (doom-modeline--buffer-simple-name) + (when (eq major-mode 'calc-mode) + (concat + (doom-modeline-spc) + (number-to-string calc-internal-prec) + (doom-modeline-spc) + (upcase-initials (symbol-name calc-angle-mode)) + (doom-modeline-spc) + (my/-calc-float-mode-string) + (when calc-prefer-frac + (concat + (doom-modeline-spc) + "Frac")) + (cond + (calc-algebraic-mode + (concat + (doom-modeline-spc) + "Alg")) + (calc-incomplete-algebraic-mode + (concat + (doom-modeline-spc) + "IAlg"))))))))) ;; sage (for when calc is not enough) (use-package sage-shell-mode