branch: scratch/editorconfig-cc
commit 98c0f94e616b0cfb941f674f8c7963c342e8567b
Author: 10sr <8.slas...@gmail.com>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

    Check mode-class property for special modes (#301)
    
    In addition to checking parent mode
---
 editorconfig.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/editorconfig.el b/editorconfig.el
index 03d8a5345a..a2fac17b3f 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -354,6 +354,9 @@ Make a message by passing ARGS to `format-message'."
   "Return non-nil when Editorconfig is disabled for MAJORMODE."
   (cl-assert majormode)
   (or (provided-mode-derived-p majormode 'special-mode)
+      ;; Some special modes (like `archive-mode') are not derived from
+      ;; `special-mode'
+      (eq (get majormode 'mode-class) 'special)
       (memq majormode
             editorconfig-exclude-modes)))
 

Reply via email to