Add option to display point value
This commit is contained in:
parent
670f2c0c39
commit
07355d6cf8
11
mood-line.el
11
mood-line.el
@ -67,6 +67,11 @@
|
||||
"A minimal mode-line configuration inspired by doom-modeline."
|
||||
:group 'mode-line)
|
||||
|
||||
(defcustom mood-line-show-point nil
|
||||
"If t, the value of `point' will be displayed next to the cursor position in the mode-line."
|
||||
:group 'mood-line
|
||||
:type 'boolean)
|
||||
|
||||
(defface mood-line-status-grayed-out
|
||||
'((t (:inherit (font-lock-doc-face))))
|
||||
"Face used for neutral or inactive status indicators in the mode-line."
|
||||
@ -221,6 +226,12 @@
|
||||
(defun mood-line-segment-position ()
|
||||
"Displays the current cursor position in the mode-line."
|
||||
(concat "%l:%c"
|
||||
(when mood-line-show-point
|
||||
(concat ":"
|
||||
(propertize (format "%d" (point)) 'face (if (mood-line-is-active)
|
||||
'mood-line-unimportant
|
||||
'mode-line-inactive))))
|
||||
" "
|
||||
(propertize "%p%%" 'face (if (mood-line-is-active)
|
||||
'mood-line-unimportant
|
||||
'mode-line-inactive))
|
||||
|
Loading…
Reference in New Issue
Block a user