From 4f58e9de81f21b4a9815ad40e40fbbed96bbd15f Mon Sep 17 00:00:00 2001 From: liuyinz Date: Thu, 28 Nov 2024 05:58:05 +0800 Subject: [PATCH] style: reindent some blocks --- mini-echo-segments.el | 16 ++++++++-------- mini-echo.el | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mini-echo-segments.el b/mini-echo-segments.el index 9c69351..85435fb 100644 --- a/mini-echo-segments.el +++ b/mini-echo-segments.el @@ -366,7 +366,7 @@ Otherwise, show mise section always." CONSTRUCT is mode line data structure ,when CONSTRUCT is not a string or optional arg FORCE is non-nil, call `format-mode-line' always." (when-let* ((str (or (and (stringp construct) (null force) construct) - (copy-sequence (format-mode-line construct))))) + (copy-sequence (format-mode-line construct))))) ;; NOTE remove all text properties except face (remove-list-of-text-properties 0 (length str) '(help-echo mouse-face keymap local-map @@ -445,7 +445,7 @@ with ellipsis." ('projectile (and (bound-and-true-p projectile-mode) (projectile-project-root))) ('project (when-let* (((fboundp 'project-current)) - (project (project-current))) + (project (project-current))) (expand-file-name (if (fboundp 'project-root) (project-root project) @@ -585,8 +585,8 @@ with ellipsis." "Return current process info." :fetch (when-let* (((bound-and-true-p mode-line-process)) - (str (mini-echo-segment--extract mode-line-process 'force)) - ((not (string-empty-p str)))) + (str (mini-echo-segment--extract mode-line-process 'force)) + ((not (string-empty-p str)))) (pcase major-mode ('ibuffer-mode (let ((sign (if (string-match-p "\\[rev]" str) "\u2193" "\u2191")) @@ -750,10 +750,10 @@ Segment appearance depends on var `vc-display-status' and faces like (when (bound-and-true-p flycheck-mode) (concat (when-let* ((ind (pcase flycheck-last-status-change - ((and n (guard (memq n '(not-checked no-checker suspicious)))) "?") - ((and n (guard (memq n '(errord interrupted)))) "!") - ('running "*") - ('finished nil)))) + ((and n (guard (memq n '(not-checked no-checker suspicious)))) "?") + ((and n (guard (memq n '(errord interrupted)))) "!") + ('running "*") + ('finished nil)))) (propertize ind 'face 'compilation-mode-line-run)) (apply #'format "%s/%s/%s" (--zip-with (propertize it 'face other) diff --git a/mini-echo.el b/mini-echo.el index f6154d6..9fdeb6a 100644 --- a/mini-echo.el +++ b/mini-echo.el @@ -269,7 +269,7 @@ If optional arg SHOW is non-nil, show the mode line." (run-with-timer 5 nil (lambda () (when-let* ((bufs (--remove (buffer-local-value 'hide-mode-line-mode it) - (buffer-list)))) + (buffer-list)))) (--each bufs (with-current-buffer it (hide-mode-line-mode 1))))))))) (defun mini-echo-show-divider (&optional hide) @@ -402,8 +402,8 @@ If optional arg RESET is non-nil, clear all toggled segments." (setq mini-echo--toggled-segments nil) (message "Mini-echo-toggle: reset to default.")) (when-let* ((segment (completing-read - "Mini-echo toggle: " - (mini-echo--toggle-completion) nil t))) + "Mini-echo toggle: " + (mini-echo--toggle-completion) nil t))) (setf (alist-get segment mini-echo--toggled-segments nil nil #'string=) (let ((val (alist-get segment mini-echo--toggled-segments 'non-exist)))