branch: scratch/editorconfig-cc
commit 706348108cb5a49743264e5c19b911b7411c8cb7
Author: 10sr <[email protected]>
Commit: Stefan Monnier <[email protected]>
Check editorconfig configs when read only state changes
---
editorconfig.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/editorconfig.el b/editorconfig.el
index 3cbca99f00..45ef0bae3a 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -439,7 +439,8 @@ mode is not listed in `editorconfig-exclude-modes'."
:lighter " EditorConfig"
;; See https://github.com/editorconfig/editorconfig-emacs/issues/141 for why
;; not `after-change-major-mode-hook'
- (dolist (hook '(change-major-mode-after-body-hook))
+ (dolist (hook '(change-major-mode-after-body-hook
+ read-only-mode-hook))
(if editorconfig-mode
(add-hook hook 'editorconfig-mode-apply)
(remove-hook hook 'editorconfig-mode-apply))))