branch: scratch/editorconfig
commit d361883d9c9e1f9b038806b0a7798444bf1e81a4
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

    (editorconfig--get-coding-system); Fix infinite recursion
---
 editorconfig.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/editorconfig.el b/editorconfig.el
index 12874d670c..329320b3de 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -858,6 +858,8 @@ F is that function, and FILENAME and ARGS are arguments 
passed to F."
 (defun editorconfig--get-coding-system (_size)
   (when (and (stringp auto-coding-file-name)
              (file-name-absolute-p auto-coding-file-name)
+            ;; Don't recurse infinitely.
+            (not (string-match-p "\\.editorconfig\\'" auto-coding-file-name))
              ;; FIXME: How important is it to support these `disabled-*'?
              (not (editorconfig--disabled-for-filename auto-coding-file-name)))
     ;; FIXME: Cache the result of `editorconfig-call-get-properties-function'?

Reply via email to