From f9d98b935ef133baed33e341bbfe8d87443ca2b1 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Fri, 4 Jan 2019 22:34:45 +0800 Subject: [PATCH] Fix: watch buffer-read-only. --- doom-modeline.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doom-modeline.el b/doom-modeline.el index 82d3cd1..2e05089 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -833,8 +833,9 @@ Uses `all-the-icons-material' to fetch the icon." (when (>= emacs-major-version 26) (add-variable-watcher 'buffer-read-only - (lambda (_sym _val op _where) + (lambda (_sym val op _where) (when (eq op 'set) + (setq buffer-read-only val) (doom-modeline-update-buffer-file-state-icon))))) (defvar-local doom-modeline--buffer-file-name nil)