From b0750259a336a56591a10adb58038d0d101124f9 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Wed, 28 Nov 2018 14:43:29 +0800 Subject: [PATCH] Use when-let* for safer in symbol overlay panel. --- doom-modeline.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doom-modeline.el b/doom-modeline.el index 49a95d0..d69acb8 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -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) (not (bound-and-true-p symbol-overlay-temp-symbol)) (not (bound-and-true-p iedit-mode))) - (let* ((keyword (symbol-overlay-assoc - (ignore-errors (symbol-overlay-get-symbol)))) - (symbol (car keyword)) - (before (symbol-overlay-get-list symbol 'car)) - (after (symbol-overlay-get-list symbol 'cdr)) - (count (length before))) + (when-let* ((keyword (symbol-overlay-assoc + (ignore-errors (symbol-overlay-get-symbol)))) + (symbol (car keyword)) + (before (symbol-overlay-get-list symbol 'car)) + (after (symbol-overlay-get-list symbol 'cdr)) + (count (length before))) (if (symbol-overlay-assoc symbol) (propertize (format (concat " %d/%d " (and (cadr keyword) "in scope "))