Skip to content

Commit d77e1ad

Browse files
committed
chore: Use elenv's 2str
1 parent 12fa358 commit d77e1ad

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

jcs-modeline.el

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@
153153
;; (@* "Util" )
154154
;;
155155

156-
(defun jcs-modeline-2str (obj)
157-
"Convert OBJ to string."
158-
(format "%s" obj))
159-
160156
(defvar jcs-modeline--char-displayable-cache (make-hash-table :test 'equal)
161157
"Cache the displable character.")
162158

@@ -355,7 +351,7 @@ mouse-1: Toggle display of major mode name"
355351
'mouse-face 'mode-line-highlight
356352
'help-echo "Column"))
357353
(ind-point (concat "("
358-
(propertize (jcs-modeline-2str (point))
354+
(propertize (elenv-2str (point))
359355
'mouse-face 'mode-line-highlight
360356
'help-echo "Point")
361357
")"))
@@ -462,7 +458,7 @@ mouse-1: Switch project"
462458
(not (string-empty-p backend-icon)))
463459
" "
464460
""))
465-
(tip (jcs-modeline-2str backend)))
461+
(tip (elenv-2str backend)))
466462
(concat (propertize backend-icon
467463
'mouse-face 'mode-line-highlight
468464
'help-echo tip
@@ -556,23 +552,23 @@ mouse-1: Switch project"
556552
(tree-size (undo-tree-size buffer-undo-tree))
557553
(timestamp (string-trim (undo-tree-timestamp-to-string timestamp))))
558554
(concat " "
559-
(propertize (jcs-modeline-2str tree-height)
555+
(propertize (elenv-2str tree-height)
560556
'mouse-face 'mode-line-highlight
561557
'help-echo "UndoTree Height")
562558
"/"
563-
(propertize (jcs-modeline-2str tree-branch-height)
559+
(propertize (elenv-2str tree-branch-height)
564560
'mouse-face 'mode-line-highlight
565561
'help-echo "UndoTree Branch Height")
566562
"/"
567-
(propertize (jcs-modeline-2str tree-count)
563+
(propertize (elenv-2str tree-count)
568564
'mouse-face 'mode-line-highlight
569565
'help-echo "UndoTree Count")
570566
" ("
571-
(propertize (jcs-modeline-2str tree-size)
567+
(propertize (elenv-2str tree-size)
572568
'mouse-face 'mode-line-highlight
573569
'help-echo "UndoTree Size")
574570
") "
575-
(propertize (jcs-modeline-2str timestamp)
571+
(propertize (elenv-2str timestamp)
576572
'mouse-face 'mode-line-highlight
577573
'help-echo "UndoTree Timestamp"))))
578574

0 commit comments

Comments
 (0)