07/06/23 01:21:51
>>150 さんの受けて修正しました。僕のところだと 21.4 で動かないので。
(define-minor-mode point-indication-mode
"Toggle Point Indication mode.
With arg, turn Point Indication mode on iff arg is positive.
When Point Indication mode is enabled, the point appears
in the mode line."
:init-value nil :global nil :group 'mode-line)
(let ((cell (or (memq 'mode-line-position mode-line-format)
(memq 'mode-line-buffer-identification mode-line-format)))
(new '(point-indication-mode
;;(:eval (format " P%-7d" (point)))
(:eval (format " P%d" (point)))
)))
(unless (member new mode-line-format)
(setcdr cell (cons new (cdr cell)))))