commit 3c1abde7d2879a40f26c2d3d925b1ce2a385c26e
parent fe764f3e170486cb56727e0a88b224627f3885af
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))