Fix: watch buffer-read-only.

This commit is contained in:
Vincent Zhang 2019-01-04 22:34:45 +08:00
parent 5adedd5953
commit f9d98b935e

View file

@ -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)