summary refs log tree commit diff stats
path: root/lisp/+modeline.el
diff options
context:
space:
mode:
authorCase Duckworth2022-03-11 20:04:05 -0600
committerCase Duckworth2022-03-11 20:04:05 -0600
commitf6512fe1bd9738e1c2c5c9a7ad92098b2f02fa34 (patch)
treec5cf0551e9e25e5238f474fd6ad44fbe6d155e56 /lisp/+modeline.el
parentAdd snippets (diff)
downloademacs-f6512fe1bd9738e1c2c5c9a7ad92098b2f02fa34.tar.gz
emacs-f6512fe1bd9738e1c2c5c9a7ad92098b2f02fa34.zip
Uh
Diffstat (limited to 'lisp/+modeline.el')
-rw-r--r--lisp/+modeline.el23
1 files changed, 22 insertions, 1 deletions
diff --git a/lisp/+modeline.el b/lisp/+modeline.el index c8dab4e..7bef5c6 100644 --- a/lisp/+modeline.el +++ b/lisp/+modeline.el
@@ -296,7 +296,7 @@ See `line-number-mode', `column-number-mode', `file-percentage-mode'"
296 (interactive "e") 296 (interactive "e")
297 (with-selected-window 297 (with-selected-window
298 (posn-window 298 (posn-window
299 (event-start ev)) 299 (event-start e))
300 (god-local-mode -1) 300 (god-local-mode -1)
301 (force-mode-line-update))))) 301 (force-mode-line-update)))))
302 'mouse-face 'mode-line-highlight)))) 302 'mouse-face 'mode-line-highlight))))
@@ -326,5 +326,26 @@ See `line-number-mode', `column-number-mode', `file-percentage-mode'"
326 map)) 326 map))
327 'mouse-face 'mode-line-highlight)))) 327 'mouse-face 'mode-line-highlight))))
328 328
329(defface +modeline-kmacro-indicator '((t :foreground "Firebrick"))
330 "Face for the kmacro indicator in the modeline.")
331
332(defun +modeline-kmacro-indicator (&optional spacer)
333 "Display an indicator when recording a kmacro."
334 (when defining-kbd-macro
335 (concat (or spacer +modeline-default-spacer)
336 (propertize "●"
337 'face '+modeline-kmacro-indicator
338 'help-echo (format (concat "Defining a macro\n"
339 "Current step: %d\n"
340 "mouse-1: Stop recording")
341 kmacro-counter)
342 'local-map (purecopy (simple-modeline-make-mouse-map
343 'mouse-1 (lambda (e)
344 (interactive "e")
345 (with-selected-window
346 (posn-window (event-start e))
347 (kmacro-end-macro nil)))))
348 'mouse-face 'mode-line-highlight))))
349
329(provide '+modeline) 350(provide '+modeline)
330;;; +modeline.el ends here 351;;; +modeline.el ends here