aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark A. Hershberger2025-08-09 13:02:54 -0400
committerMark A. Hershberger2025-08-09 13:07:34 -0400
commitc4af4b39018923fdfc22b515acc1f6ba3f2b024d (patch)
tree630a5f9aaa9716aea5dfe4e7dc0a0a6e81152c0d
parent210bcf13664ba66d6091ab7dbe540c4677980c78 (diff)
downloademacs-c4af4b39018923fdfc22b515acc1f6ba3f2b024d.tar.gz
emacs-c4af4b39018923fdfc22b515acc1f6ba3f2b024d.zip
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.
-rw-r--r--lisp/org/org-src.el3
1 files changed, 2 insertions, 1 deletions
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."
665 "Fontify code block between START and END using LANG's syntax. 665 "Fontify code block between START and END using LANG's syntax.
666This function is called by Emacs's automatic fontification, as long 666This function is called by Emacs's automatic fontification, as long
667as `org-src-fontify-natively' is non-nil." 667as `org-src-fontify-natively' is non-nil."
668 (let ((modified (buffer-modified-p)) native-tab-width) 668 (let ((modified (buffer-modified-p))
669 (native-tab-width tab-width))
669 (remove-text-properties start end '(face nil)) 670 (remove-text-properties start end '(face nil))
670 (let ((lang-mode (org-src-get-lang-mode lang))) 671 (let ((lang-mode (org-src-get-lang-mode lang)))
671 (when (fboundp lang-mode) 672 (when (fboundp lang-mode)