From c4af4b39018923fdfc22b515acc1f6ba3f2b024d Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Sat, 9 Aug 2025 13:02:54 -0400 Subject: [PATCH] Initialize native-tab-width in cases where there is no language mode org-src-font-lock-fontify-block creates an uninitialized native-tab-width variable and then, when there is no language set on a block, ends up using it. This triggers an error. --- lisp/org/org-src.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index d8a928b1f9f..49fc4103cc7 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -665,7 +665,8 @@ Leave point in edit buffer." "Fontify code block between START and END using LANG's syntax. This function is called by Emacs's automatic fontification, as long as `org-src-fontify-natively' is non-nil." - (let ((modified (buffer-modified-p)) native-tab-width) + (let ((modified (buffer-modified-p)) + (native-tab-width tab-width)) (remove-text-properties start end '(face nil)) (let ((lang-mode (org-src-get-lang-mode lang))) (when (fboundp lang-mode)