about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-09-29 17:21:01 -0500
committerCase Duckworth2021-09-29 17:21:01 -0500
commit17b01d3eb51f21e0e77ca699da1dee3ea7482c3f (patch)
tree7763e1df6ea6f9fc9ce667544a1f698ecb2ec792 /lisp
parentMove stuff to executable setup form (diff)
downloademacs-17b01d3eb51f21e0e77ca699da1dee3ea7482c3f.tar.gz
emacs-17b01d3eb51f21e0e77ca699da1dee3ea7482c3f.zip
Also show percentage of file in the modeline
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-modeline.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 25502ec..9963309 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el
@@ -125,6 +125,10 @@ indicator in the mode-line."
125 'mouse-2 #'mode-line-widen)) 125 'mouse-2 #'mode-line-widen))
126 'mouse-face 'mode-line-highlight)))) 126 'mouse-face 'mode-line-highlight))))
127 127
128(define-minor-mode file-percentage-mode
129 "Toggle the percentage display in the mode line (File Percentage Mode)."
130 :init-value t :global t :group 'mode-line)
131
128(defun acdw-modeline/position () 132(defun acdw-modeline/position ()
129 "Displays the current cursor position in the mode-line. 133 "Displays the current cursor position in the mode-line.
130 134
@@ -140,7 +144,10 @@ is, if point < mark."
140 ((column-number-mode 144 ((column-number-mode
141 (column-number-indicator-zero-based 145 (column-number-indicator-zero-based
142 (5 " C%c") 146 (5 " C%c")
143 (5 " C%C"))))) 147 (5 " C%C")))
148 " "))
149 (file-percentage-mode
150 (7 "%p%% "))
144 ,(if (region-active-p) 151 ,(if (region-active-p)
145 (propertize (format "%s%-5d" 152 (propertize (format "%s%-5d"
146 (if (and (mark) 153 (if (and (mark)
@@ -183,7 +190,7 @@ is, if point < mark."
183(defun acdw-modeline/wc () 190(defun acdw-modeline/wc ()
184 "Display current `wc-buffer-stats'." 191 "Display current `wc-buffer-stats'."
185 (when (bound-and-true-p wc-mode) 192 (when (bound-and-true-p wc-mode)
186 (or wc-buffer-stats "[w]"))) 193 (or wc-buffer-stats " [w]")))
187 194
188(defun acdw-modeline/winum () 195(defun acdw-modeline/winum ()
189 "Show the `winum' number of the current window in the modeline. 196 "Show the `winum' number of the current window in the modeline.