Skip to content

Commit

Permalink
Check mode-class property for special modes (#301)
Browse files Browse the repository at this point in the history
In addition to checking parent mode
  • Loading branch information
10sr authored May 7, 2023
1 parent 9a3569a commit e6038c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions editorconfig.el
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,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)))

Expand Down

0 comments on commit e6038c7

Please sign in to comment.