help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Using multiple modes in org-mode to highlight source-code


From: Lennart Borgman
Subject: Re: Using multiple modes in org-mode to highlight source-code
Date: Fri, 26 Dec 2008 00:59:04 +0100

On Thu, Nov 20, 2008 at 11:40 AM, Nordlöw <per.nordlow@gmail.com> wrote:
> Has anyone succeeded in using multiple modes (using either mumamo.el,
> mmm-mode or two-mode-mode.el) to enable font-locking of code-snippets
> in org-mode? Currently only emacs lisp is supported by org-mode. But I
> believe more languages will be added in the future.
>
> Example snippet that should be highlighted in org-mode:
>
> [[elisp:(setq x 1)]]
>
> sub-mode begin pattern: "[[elisp:"
> sub-mode end pattern: "]]"
>
> I guess we could trigger on the pattern "[[LANG:" and activate LANG-
> mode in that region.
>
> We could make this work

Have you tried to do this with MuMaMo? You could probably use
mumamo-quick-static-chunk for this. (You must define a new multi major
mode too, using define-mumamo-multi-major-mode.)

reply via email to

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