Fix #80: Errors without symbol-overlay.

This commit is contained in:
Vincent Zhang 2019-01-01 00:25:12 +08:00
parent 202a90e660
commit 14d2e84b68

View file

@ -188,8 +188,7 @@ It returns a file name which can be used directly as argument of
(defvar mc/mode-line) (defvar mc/mode-line)
(defvar minions-mode) (defvar minions-mode)
(defvar minions-mode-line-lighter) (defvar minions-mode-line-lighter)
(defvar symbol-overlay-keywords-alist) (defvar symbol-overlay-mode)
(defvar symbol-overlay-temp-symbol)
(defvar text-scale-mode-amount) (defvar text-scale-mode-amount)
(defvar winum-auto-setup-mode-line) (defvar winum-auto-setup-mode-line)
(defvar xah-fly-insert-state-q) (defvar xah-fly-insert-state-q)
@ -1206,6 +1205,8 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
(defsubst doom-modeline--symbol-overlay () (defsubst doom-modeline--symbol-overlay ()
"Show the number of matches for symbol overlay." "Show the number of matches for symbol overlay."
(when (and (bound-and-true-p symbol-overlay-mode)
(not (bound-and-true-p iedit-mode)))
(let* ((keyword (symbol-overlay-assoc (let* ((keyword (symbol-overlay-assoc
(ignore-errors (symbol-overlay-get-symbol)))) (ignore-errors (symbol-overlay-get-symbol))))
(symbol (car keyword)) (symbol (car keyword))
@ -1217,7 +1218,7 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
(format (concat " %d/%d " (and (cadr keyword) "in scope ")) (format (concat " %d/%d " (and (cadr keyword) "in scope "))
(+ count 1) (+ count 1)
(+ count (length after))) (+ count (length after)))
'face (if (doom-modeline--active) 'doom-modeline-panel))))) 'face (if (doom-modeline--active) 'doom-modeline-panel))))))
(defsubst doom-modeline--multiple-cursors () (defsubst doom-modeline--multiple-cursors ()
"Show the number of multiple cursors." "Show the number of multiple cursors."