emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: [PATCH] Skip source block fontification when the language


From: Dan Davison
Subject: [Orgmode] Re: [PATCH] Skip source block fontification when the language is not defined
Date: Wed, 22 Dec 2010 12:08:17 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin)

Bernt Hansen <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]