@@ -373,8 +373,8 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
373373(defsubst doom-modeline--buffer-mode-icon ()
374374 " The icon of the current major mode."
375375 (when (and doom-modeline-icon doom-modeline-major-mode-icon)
376- (when-let ((icon (or doom-modeline--buffer-file-icon
377- (doom-modeline-update-buffer-file-icon))))
376+ (when-let* ((icon (or doom-modeline--buffer-file-icon
377+ (doom-modeline-update-buffer-file-icon))))
378378 (unless (string-empty-p icon)
379379 (concat
380380 (if doom-modeline-major-mode-color-icon
@@ -387,7 +387,7 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
387387(defsubst doom-modeline--buffer-state-icon ()
388388 " The icon of the current buffer state."
389389 (when doom-modeline-buffer-state-icon
390- (when-let ((icon (doom-modeline-update-buffer-file-state-icon)))
390+ (when-let* ((icon (doom-modeline-update-buffer-file-state-icon)))
391391 (unless (string-empty-p icon)
392392 (concat
393393 (doom-modeline-display-icon icon)
@@ -414,8 +414,8 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
414414 ; ; Only display the buffer name if the window is small, and doesn't
415415 ; ; need to respect file-name style.
416416 (doom-modeline--buffer-simple-name)
417- (when-let ((name (or doom-modeline--buffer-file-name
418- (doom-modeline-update-buffer-file-name))))
417+ (when-let* ((name (or doom-modeline--buffer-file-name
418+ (doom-modeline-update-buffer-file-name))))
419419 ; ; Check if the buffer is modified
420420 (if (and doom-modeline-highlight-modified-buffer-name
421421 (buffer-modified-p ))
@@ -445,7 +445,7 @@ read-only or non-existent)."
445445 " Display calculator icons and info."
446446 (concat
447447 (doom-modeline-spc)
448- (when-let ((icon (doom-modeline-icon 'faicon " nf-fa-calculator" " 🖩" " " )))
448+ (when-let* ((icon (doom-modeline-icon 'faicon " nf-fa-calculator" " 🖩" " " )))
449449 (concat
450450 (doom-modeline-display-icon icon)
451451 (doom-modeline-vspc)))
@@ -573,7 +573,7 @@ project directory is important."
573573(doom-modeline-def-segment remote-host
574574 " Hostname for remote buffers."
575575 (when default-directory
576- (when-let ((host (file-remote-p default-directory 'host )))
576+ (when-let* ((host (file-remote-p default-directory 'host )))
577577 (propertize
578578 (concat " @" host)
579579 'face (doom-modeline-face 'doom-modeline-host )))))
@@ -1029,15 +1029,15 @@ level."
10291029
10301030(doom-modeline-def-segment check
10311031 " Displays color-coded error status in the current buffer with pretty icons."
1032- (when-let ((sep (doom-modeline-spc))
1033- (vsep (doom-modeline-vspc))
1034- (seg (cond
1035- ((and (bound-and-true-p flymake-mode)
1036- (bound-and-true-p flymake--state)) ; only support 26+
1037- doom-modeline--flymake)
1038- ((and (bound-and-true-p flycheck-mode)
1039- (bound-and-true-p flycheck--automatically-enabled-checkers))
1040- doom-modeline--flycheck))))
1032+ (when-let* ((sep (doom-modeline-spc))
1033+ (vsep (doom-modeline-vspc))
1034+ (seg (cond
1035+ ((and (bound-and-true-p flymake-mode)
1036+ (bound-and-true-p flymake--state)) ; only support 26+
1037+ doom-modeline--flymake)
1038+ ((and (bound-and-true-p flycheck-mode)
1039+ (bound-and-true-p flycheck--automatically-enabled-checkers))
1040+ doom-modeline--flycheck))))
10411041 (concat
10421042 sep
10431043 (let ((str))
@@ -1525,7 +1525,7 @@ one. The ignored buffers are excluded unless `aw-ignore-on' is nil."
15251525 " The current workspace name or number.
15261526Requires `eyebrowse-mode' to be enabled or `tab-bar-mode' tabs to be created."
15271527 (when doom-modeline-workspace-name
1528- (when-let
1528+ (when-let*
15291529 ((name (cond
15301530 ((and (bound-and-true-p eyebrowse-mode)
15311531 (length> (eyebrowse--get 'window-configs ) 1 ))
@@ -1873,14 +1873,14 @@ Including `evil', `overwrite', `god', `ryo' and `xha-fly-kyes', etc."
18731873
18741874(doom-modeline-def-segment input-method
18751875 " The current input method."
1876- (when-let ((im (cond
1877- (current-input-method
1878- current-input-method-title)
1879- ((and (bound-and-true-p evil-local-mode)
1880- (bound-and-true-p evil-input-method))
1881- (nth 3 (assoc default-input-method input-method-alist)))
1882- (t nil )))
1883- (sep (doom-modeline-spc)))
1876+ (when-let* ((im (cond
1877+ (current-input-method
1878+ current-input-method-title)
1879+ ((and (bound-and-true-p evil-local-mode)
1880+ (bound-and-true-p evil-input-method))
1881+ (nth 3 (assoc default-input-method input-method-alist)))
1882+ (t nil )))
1883+ (sep (doom-modeline-spc)))
18841884 (concat
18851885 sep
18861886 (propertize im
@@ -1971,9 +1971,9 @@ mouse-3: Describe current input method")
19711971(doom-modeline-def-segment repl
19721972 " The REPL state."
19731973 (when doom-modeline-repl
1974- (when-let ((icon (when (bound-and-true-p cider-mode)
1975- doom-modeline--cider))
1976- (sep (doom-modeline-spc)))
1974+ (when-let* ((icon (when (bound-and-true-p cider-mode)
1975+ doom-modeline--cider))
1976+ (sep (doom-modeline-spc)))
19771977 (concat
19781978 sep
19791979 (doom-modeline-display-icon icon)
@@ -2121,13 +2121,13 @@ mouse-1: Toggle citre mode"
21212121(doom-modeline-def-segment lsp
21222122 " The LSP server state."
21232123 (when doom-modeline-lsp
2124- (when-let ((icon (cond ((bound-and-true-p lsp-mode)
2125- doom-modeline--lsp)
2126- ((bound-and-true-p eglot--managed-mode)
2127- doom-modeline--eglot)
2128- ((bound-and-true-p citre-mode)
2129- doom-modeline--tags)))
2130- (sep (doom-modeline-spc)))
2124+ (when-let* ((icon (cond ((bound-and-true-p lsp-mode)
2125+ doom-modeline--lsp)
2126+ ((bound-and-true-p eglot--managed-mode)
2127+ doom-modeline--eglot)
2128+ ((bound-and-true-p citre-mode)
2129+ doom-modeline--tags)))
2130+ (sep (doom-modeline-spc)))
21312131 (concat
21322132 sep
21332133 (doom-modeline-display-icon icon)
@@ -2289,7 +2289,7 @@ mouse-3: Fetch notifications"
22892289 " The current `dap-mode' state."
22902290 (when (and (bound-and-true-p dap-mode)
22912291 (bound-and-true-p lsp-mode))
2292- (when-let ((session (dap--cur-session)))
2292+ (when-let* ((session (dap--cur-session)))
22932293 (when (dap--session-running session)
22942294 (propertize (doom-modeline-debug-icon 'doom-modeline-info )
22952295 'help-echo (format " DAP (%s - %s )
@@ -2301,11 +2301,11 @@ mouse-3: Disconnect session"
23012301 'mouse-face 'doom-modeline-highlight
23022302 'local-map (let ((map (make-sparse-keymap )))
23032303 (define-key map [mode-line mouse-1]
2304- #'dap-hydra )
2304+ #'dap-hydra )
23052305 (define-key map [mode-line mouse-2]
2306- #'dap-debug-recent )
2306+ #'dap-debug-recent )
23072307 (define-key map [mode-line mouse-3]
2308- #'dap-disconnect )
2308+ #'dap-disconnect )
23092309 map))))))
23102310
23112311(defvar-local doom-modeline--debug-dap nil )
0 commit comments