Skip to content

Commit

Permalink
editorconfig.el: skip special-mode buffers when applying (#246) (#247)
Browse files Browse the repository at this point in the history
Some buffers get confused if you keep setting their mode, one example
is git-rebase-mode. This is an example buffer of a class of
special-mode buffers which are usually (but not always) non-file
buffers. Either way these buffers are usually special purpose
interactive buffers that will only get confused if editorconfig tries
to mess around with them.
  • Loading branch information
stsquad committed Feb 9, 2021
1 parent 9dd9789 commit f830b86
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions editorconfig.el
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ This function does nothing when the major mode is listed in
any of regexps in `editorconfig-exclude-regexps'."
(interactive)
(when (and major-mode
(not (derived-mode-p 'special-mode))
(not (memq major-mode
editorconfig-exclude-modes))
buffer-file-name
Expand Down

0 comments on commit f830b86

Please sign in to comment.