From 5bed0a6d161a8f01216f7372f442b6917325f6c5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 16 May 2021 15:21:42 -0400 Subject: [PATCH] Fix #5057: don't read editorconfig files in archives --- modules/tools/editorconfig/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/tools/editorconfig/config.el b/modules/tools/editorconfig/config.el index ffb973ddd..de1b590da 100644 --- a/modules/tools/editorconfig/config.el +++ b/modules/tools/editorconfig/config.el @@ -24,6 +24,12 @@ (when (require 'ws-butler nil t) (setq editorconfig-trim-whitespaces-mode 'ws-butler-mode)) + ;; Fix #5057 archives don't need editorconfig settings, and they may otherwise + ;; interfere with the process of opening them (office formats are zipped XML + ;; formats). + (add-to-list 'editorconfig-exclude-regexps + "\\.\\(zip\\|\\(doc\\|xls\\|ppt\\)x\\)\\'") + (defadvice! +editorconfig--smart-detection-a (orig-fn) "Retrieve the properties for the current file. If it doesn't have an extension, try to guess one."