Bernt Hansen <be...@norang.ca> writes: > * lisp/org.el: Skip source block fontification during export when language > is not defined > --- > This may not be the correct fix for this issue but it works for me.
Hi Bernt, I've checked in a slightly different version[1] of this fix. Thanks for the report; it wasn't nice to have been throwing errors every time an unrecognised (e.g. partial) language string was entered, even if most of the time font-lock was subduing these errors. Dan Footnotes: [1] I've made the org-src fontification function test, early on, whether the language major-mode function exists. If it doesn't then it returns immediately. > > This patch is available at git://git.norang.ca/org-mode.git fix-export > > -Bernt > > lisp/org.el | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/lisp/org.el b/lisp/org.el > index 3cecca7..006e7bf 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -5142,7 +5142,7 @@ will be prompted for." > (add-text-properties end1 (+ end 1) '(face org-meta-line)) > ; for end_src > (cond > - ((and lang org-src-fontify-natively) > + ((and lang (not (string-equal lang "")) org-src-fontify-natively) > (org-src-font-lock-fontify-block lang block-start block-end)) > (quoting > (add-text-properties beg1 (+ end1 1) '(face _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode