From ea2a1072c2b74afafb5c4f79519f8900baf87325 Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Sun, 12 Oct 2025 17:24:28 +0100 Subject: Propertize read-only status --- modally.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modally.el') diff --git a/modally.el b/modally.el index 084c5c4..13cb17f 100644 --- a/modally.el +++ b/modally.el @@ -41,7 +41,10 @@ (defun modally--read-only-status () "Return a string to display read-only status." (format "%s %s" - (if buffer-read-only " RO" " RW") + (if buffer-read-only + (propertize " RO" 'face (if (mode-line-window-selected-p) + 'warning)) + " RW") (modally--separator))) (defun modally--buffer-name () @@ -49,7 +52,6 @@ (let* ((buffer-face (cond ((not (mode-line-window-selected-p)) 'mode-line-inactive) ((buffer-modified-p) 'modally-buffer-modified) - (buffer-read-only 'modally-buffer-readonly) ('modally-buffer))) (buffer-name (if buffer-file-name -- cgit