Skip to content

Commit

Permalink
style: reindent some blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
eki3z committed Nov 27, 2024
1 parent 28268a4 commit 4f58e9d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions mini-echo-segments.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"))
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions mini-echo.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit 4f58e9d

Please sign in to comment.