From 7d69c5f7dfa089a8b9bbdd7199869f583aed3b3a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 30 Jun 2025 23:37:51 +0200 Subject: [PATCH] fix(lib): void-function editorconfig--default-indent-size-function There are two editorconfig libraries. One built into 30+ and one on MELPA. Same name, different APIs. If the MELPA one is installed through, say, your OS package manager, then the detection heuristic in `doom/set-indent-width` could get confused which library is which. Fix: #8423 --- lisp/lib/text.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/lib/text.el b/lisp/lib/text.el index 7839c1e58..5c87dfc92 100644 --- a/lisp/lib/text.el +++ b/lisp/lib/text.el @@ -373,7 +373,8 @@ editorconfig or dtrt-indent installed." ;; A built-in `editorconfig' package was added in Emacs 30.x, but ;; with a different API. Since it's built in, prefer it over the ;; upstream one, but we still need to adapt: - (require 'editorconfig nil t)) + (if (require 'editorconfig nil t) + (fboundp #'editorconfig--default-indent-size-function))) (pcase-dolist (`(,var . ,val) (editorconfig--default-indent-size-function width)) (set (make-local-variable var) val))) ((require 'editorconfig nil t)