From e0781c47e1b35694980b7bd0441cbe3c1b68e387 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 26 Feb 2026 12:37:03 +0100 Subject: emacs: Support overwrite-mode in the modeline --- .config/emacs/mango-theme.el | 4 +++- .config/emacs/modules/mm-modeline.el | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to '.config/emacs') diff --git a/.config/emacs/mango-theme.el b/.config/emacs/mango-theme.el index a18b9ce..5fec2e0 100644 --- a/.config/emacs/mango-theme.el +++ b/.config/emacs/mango-theme.el @@ -86,6 +86,8 @@ graphically, so I shouldn’t need to have multiple specs per face. :inherit font-lock-comment-face) ;; Modeline + (mm-modeline-overwrite-face + :weight bold) (mm-modeline-readonly-face :weight bold) (mm-modeline-buffer-name-face @@ -183,4 +185,4 @@ graphically, so I shouldn’t need to have multiple specs per face. :background ,(mango-theme--color 'middleground)) (tempel-form :slant italic - :background ,(mango-theme--color 'middleground))) \ No newline at end of file + :background ,(mango-theme--color 'middleground))) diff --git a/.config/emacs/modules/mm-modeline.el b/.config/emacs/modules/mm-modeline.el index 57f464d..dcda463 100644 --- a/.config/emacs/modules/mm-modeline.el +++ b/.config/emacs/modules/mm-modeline.el @@ -25,6 +25,10 @@ ;;; Modeline Components +(mm-modeline--define-component mm-modeline-overwrite + (when overwrite-mode + (propertize " OVERWRITE" 'face 'mm-modeline-overwrite-face))) + (mm-modeline--define-component mm-modeline-readonly (when buffer-read-only (propertize " READONLY" 'face 'mm-modeline-readonly-face))) @@ -124,6 +128,7 @@ the text it should be mapped to.") (setq mm-modeline-left (list mm-modeline-narrow + mm-modeline-overwrite mm-modeline-readonly " " mm-modeline-buffer-name @@ -139,4 +144,4 @@ the text it should be mapped to.") (setq-default mode-line-format (list mm-modeline-left mm-modeline-left-right-padding mm-modeline-right)) -(provide 'mm-modeline) \ No newline at end of file +(provide 'mm-modeline) -- cgit v1.2.3