summary refs log tree commit diff stats
path: root/lisp/+modeline.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/+modeline.el')
-rw-r--r--lisp/+modeline.el20
1 files changed, 20 insertions, 0 deletions
diff --git a/lisp/+modeline.el b/lisp/+modeline.el index 7615ea7..47299ec 100644 --- a/lisp/+modeline.el +++ b/lisp/+modeline.el
@@ -111,6 +111,26 @@ The order of elements matters: whichever one matches first is applied."
111 'face 'font-lock-doc-face 111 'face 'font-lock-doc-face
112 'mouse-face 'mode-line-highlight)))) 112 'mouse-face 'mode-line-highlight))))
113 113
114(defun +modeline-reading-mode ()
115 "Display an indication that the buffer is in `reading-mode'."
116 (when reading-mode
117 (concat " "
118 (propertize "R"
119 'help-echo (format "%s\n%s"
120 "Buffer is in reading-mode."
121 "mouse-2: disable reading-mode.")
122 'local-map (purecopy
123 (simple-modeline-make-mouse-map
124 'mouse-2 (lambda (ev)
125 (interactive "e")
126 (with-selected-window
127 (posn-window
128 (event-start ev))
129 (reading-mode -1)
130 (force-mode-line-update)))))
131 'face 'font-lock-doc-face
132 'mouse-face 'mode-line-highlight))))
133
114(define-minor-mode file-percentage-mode 134(define-minor-mode file-percentage-mode
115 "Toggle the percentage display in the mode line (File Percentage Mode)." 135 "Toggle the percentage display in the mode line (File Percentage Mode)."
116 :init-value t :global t :group 'mode-line) 136 :init-value t :global t :group 'mode-line)