diff --git a/doom-modeline-core.el b/doom-modeline-core.el index bf225a4..ec3241a 100644 --- a/doom-modeline-core.el +++ b/doom-modeline-core.el @@ -28,6 +28,7 @@ ;;; Code: +(require 'all-the-icons) (require 'eldoc-eval) (require 'shrink-path) (require 'subr-x) @@ -234,14 +235,6 @@ The icons may not be showed correctly in terminal.") ;; Externals ;; -(defvar all-the-icons-scale-factor) - -(declare-function all-the-icons-alltheicon 'all-the-icons) -(declare-function all-the-icons-faicon 'all-the-icons) -(declare-function all-the-icons-icon-for-file 'all-the-icons) -(declare-function all-the-icons-icon-for-mode 'all-the-icons) -(declare-function all-the-icons-material 'all-the-icons) -(declare-function all-the-icons-octicon 'all-the-icons) (declare-function face-remap-remove-relative 'face-remap) (declare-function project-roots 'project) (declare-function projectile-project-root 'projectile) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 751aa48..b82043b 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -29,18 +29,16 @@ ;;; Code: +(require 'all-the-icons) (require 'subr-x) (require 'doom-modeline-core) (require 'doom-modeline-env) -(when (bound-and-true-p doom-modeline-icon) - (require 'all-the-icons)) ;; ;; Externals ;; -(defvar all-the-icons-scale-factor) (defvar anzu--cached-count) (defvar anzu--current-position) (defvar anzu--overflow-p) @@ -81,8 +79,6 @@ (defvar winum-auto-setup-mode-line) (defvar xah-fly-insert-state-q) -(declare-function all-the-icons-auto-mode-match? 'all-the-icons) -(declare-function all-the-icons-icon-family 'all-the-icons) (declare-function anzu--reset-status 'anzu) (declare-function anzu--where-is-here 'anzu) (declare-function async-inject-variables 'async) @@ -223,10 +219,6 @@ buffer where knowing the current project directory is important." (lambda (_sym val op _where) (when (eq op 'set) (setq doom-modeline-icon val) - ;; Fix #149: hang while changing `doom-modeline-icon' from nil to t - (if (and doom-modeline-icon - (not (featurep 'all-the-icons))) - (require 'all-the-icons)) (dolist (buf (buffer-list)) (with-current-buffer buf (doom-modeline-update-buffer-file-icon)))))) diff --git a/doom-modeline.el b/doom-modeline.el index b7255be..13da311 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -4,7 +4,7 @@ ;; Author: Vincent Zhang ;; Homepage: https://github.com/seagle0128/doom-modeline -;; Version: 1.9.3 +;; Version: 1.9.4 ;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (eldoc-eval "0.1") (dash "2.11.0")) ;; Keywords: faces mode-line