mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 19:19:53 +00:00
Use when-let* for safer in symbol overlay panel.
This commit is contained in:
parent
e7de8eef92
commit
b0750259a3
1 changed files with 6 additions and 6 deletions
|
@ -1090,12 +1090,12 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||||
(when (and (bound-and-true-p symbol-overlay-keywords-alist)
|
(when (and (bound-and-true-p symbol-overlay-keywords-alist)
|
||||||
(not (bound-and-true-p symbol-overlay-temp-symbol))
|
(not (bound-and-true-p symbol-overlay-temp-symbol))
|
||||||
(not (bound-and-true-p iedit-mode)))
|
(not (bound-and-true-p iedit-mode)))
|
||||||
(let* ((keyword (symbol-overlay-assoc
|
(when-let* ((keyword (symbol-overlay-assoc
|
||||||
(ignore-errors (symbol-overlay-get-symbol))))
|
(ignore-errors (symbol-overlay-get-symbol))))
|
||||||
(symbol (car keyword))
|
(symbol (car keyword))
|
||||||
(before (symbol-overlay-get-list symbol 'car))
|
(before (symbol-overlay-get-list symbol 'car))
|
||||||
(after (symbol-overlay-get-list symbol 'cdr))
|
(after (symbol-overlay-get-list symbol 'cdr))
|
||||||
(count (length before)))
|
(count (length before)))
|
||||||
(if (symbol-overlay-assoc symbol)
|
(if (symbol-overlay-assoc symbol)
|
||||||
(propertize
|
(propertize
|
||||||
(format (concat " %d/%d " (and (cadr keyword) "in scope "))
|
(format (concat " %d/%d " (and (cadr keyword) "in scope "))
|
||||||
|
|
Loading…
Reference in a new issue