From f5cd4257f2ef58600f081694a08808d457d3185a Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Sat, 18 Oct 2025 22:00:40 +0100 Subject: Refactor read-only status --- modally.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'modally.el') diff --git a/modally.el b/modally.el index 13cb17f..734535a 100644 --- a/modally.el +++ b/modally.el @@ -40,11 +40,12 @@ (defun modally--read-only-status () "Return a string to display read-only status." - (format "%s %s" - (if buffer-read-only - (propertize " RO" 'face (if (mode-line-window-selected-p) - 'warning)) - " RW") + (format " %s %s" + (propertize + (if buffer-read-only "RO" "RW") + 'face (when (and (mode-line-window-selected-p) + buffer-read-only) + 'modally-buffer-readonly)) (modally--separator))) (defun modally--buffer-name () -- cgit