commit 8c65be3bdbc1feefb6ba824119509e4d5f20f87c
parent c856393cb31a2d91682af2f65174c1fae1df60c4
Author: andsy10 <andsy1016@gmail.com>
Date: Wed, 7 Oct 2026 23:46:06 +0800
Show cursor count in mode line lighter
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/kmacro-x-mc.el b/kmacro-x-mc.el
@@ -104,6 +104,13 @@ user's perspective), this is just acknowledged here."
Used by `kmacro-x-mc--mark'."
:type '(repeat symbol))
+(defcustom kmacro-x-mc-mode-lighter
+ `(" mc:" (:eval (format ,(propertize "%d" 'face 'font-lock-warning-face)
+ (length kmacro-x-mc-cursors))))
+ "What to display in the mode line while `kmacro-x-mc-mode' is active."
+ :type '(sexp))
+(put 'kmacro-x-mc-mode-lighter 'risky-local-variable t)
+
(defvar-local kmacro-x-mc-regexp nil
"A regexp matching the intended cursor positions.")
@@ -402,7 +409,7 @@ Usually invoked from `kmacro-x-mc-mark-next', not by the
user directory.
\\{kmacro-x-mc-mode-map}"
- :lighter " kmacro-mc"
+ :lighter kmacro-x-mc-mode-lighter
(if kmacro-x-mc-mode
(let ((bounds (if (use-region-p)
(cons (region-beginning) (region-end))