diff --git a/lisp/init-echo-bar.el b/lisp/init-echo-bar.el index 7a53df6..0984b10 100644 --- a/lisp/init-echo-bar.el +++ b/lisp/init-echo-bar.el @@ -11,7 +11,8 @@ :group 'applications) (defcustom echo-bar-modules - '(echo-bar--selection-info + '(echo-bar--text-scale + echo-bar--selection-info echo-bar--word-count echo-bar--symbol-overlay echo-bar--multiple-cursors @@ -43,11 +44,19 @@ If nil, don't update the echo bar automatically." :group 'echo-bar :type 'string) +(defvar text-scale-mode-amount) +(defvar text-scale-mode-lighter) + (declare-function mc/num-cursors "ext:multiple-cursors-core") (declare-function symbol-overlay-assoc "ext:symbol-overlay") (declare-function symbol-overlay-get-list "ext:symbol-overlay") (declare-function symbol-overlay-get-symbol "ext:symbol-overlay") +(defun echo-bar--text-scale () + "Text-Scale info." + (when (and (boundp 'text-scale-mode-lighter) (/= text-scale-mode-amount 0)) + text-scale-mode-lighter)) + (defun echo-bar--selection-info () "Display selection info." (when mark-active diff --git a/lisp/init-modeline.el b/lisp/init-modeline.el index 73b160a..b74d640 100644 --- a/lisp/init-modeline.el +++ b/lisp/init-modeline.el @@ -73,8 +73,6 @@ (defvar eglot-menu-string) (defvar eglot-server-menu) (defvar flymake--state) -(defvar text-scale-mode-amount) -(defvar text-scale-mode-lighter) (declare-function aw-update "ext:ace-window") (declare-function flymake--diag-type "ext:flymake" t t) @@ -156,15 +154,6 @@ (t (upcase (symbol-name (plist-get sys :name))))))) 'face (+modeline-face))) -(defun +modeline--text-scale () - "Text-Scale info in mode-line." - (when (and (boundp 'text-scale-mode-lighter) (/= text-scale-mode-amount 0)) - (propertize - (format "(%s)" text-scale-mode-lighter) - 'face (+modeline-face) - 'mouse-face '+modeline-highlight-face - 'help-echo (concat "Text scale " text-scale-mode-lighter)))) - (defun +modeline--eglot () "Eglot in mode-line." (when (bound-and-true-p eglot--managed-mode) @@ -265,8 +254,7 @@ :group '+modeline) (defcustom +modeline-right - '(+modeline--text-scale - +modeline--buffer-encoding + '(+modeline--buffer-encoding +modeline--eglot +modeline--major-mode +modeline--vc-info