From 1b6b8c5fdee2a20a20ceb5b7381d34d95ffcf5ba Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 24 Sep 2025 14:26:14 -0400 Subject: [PATCH] fix(editorconfig): only set tab-width in old org-mode Upstream now more aggressively ensures tab-width is 8, so this hook only exists for users on older versions. Ref: emacs-straight/org-mode@0dc647ff54ba --- modules/tools/editorconfig/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/tools/editorconfig/config.el b/modules/tools/editorconfig/config.el index 35aa96199..929245a2b 100644 --- a/modules/tools/editorconfig/config.el +++ b/modules/tools/editorconfig/config.el @@ -39,4 +39,7 @@ specified by editorconfig." "A tab-width != 8 is an error state in org-mode, so prevent changing it." (when (and (gethash 'indent_size props) (derived-mode-p 'org-mode)) - (setq tab-width 8))))) + ;; REVIEW: Org already does this in recent versions, so this is + ;; preserved only for users pinning to older versions. + (unless (fboundp 'org--set-tab-width) + (setq tab-width 8))))))