From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: [PATCH] Skip source block fontification when the language is not defined Date: Wed, 22 Dec 2010 12:08:17 +0000 Message-ID: References: <87r5da1mvr.fsf@norang.ca> <1292990777-10733-1-git-send-email-bernt@norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=52926 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVNUg-0004G2-2o for emacs-orgmode@gnu.org; Wed, 22 Dec 2010 07:08:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVNUd-00076g-2S for emacs-orgmode@gnu.org; Wed, 22 Dec 2010 07:08:33 -0500 Received: from lo.gmane.org ([80.91.229.12]:40513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVNUc-000761-Q6 for emacs-orgmode@gnu.org; Wed, 22 Dec 2010 07:08:31 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PVNUb-00013K-6F for emacs-orgmode@gnu.org; Wed, 22 Dec 2010 13:08:29 +0100 Received: from 94.197.185.4.threembb.co.uk ([94.197.185.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Dec 2010 13:08:29 +0100 Received: from dandavison7 by 94.197.185.4.threembb.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Dec 2010 13:08:29 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Bernt Hansen 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