commit 11652d60e157d5a6ea328d86f17a073b8506613f
parent 73e71c70736c0ed0e08e33c7ea4f691e910a8d8b
Author: andsy10 <andsy1016@gmail.com>
Date: Sat, 10 Oct 2026 19:44:48 +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))