mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
Fix #149: hang while changing `doom-modeline-icon' from nil to t.
Don't delay load all-the-icons for this case: Load Emacs daemon and enable doom-modeline-icon in Emacs clients.
This commit is contained in:
parent
48bf1f26b7
commit
3b704ee080
3 changed files with 3 additions and 18 deletions
|
@ -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)
|
||||
|
|
|
@ -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))))))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Vincent Zhang <seagle0128@gmail.com>
|
||||
;; 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
|
||||
|
||||
|
|
Loading…
Reference in a new issue