auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Lua commands in TeX-buffers: highlighting by using indirect


From: Peter Münster
Subject: Re: [AUCTeX] Lua commands in TeX-buffers: highlighting by using indirect buffers?
Date: Sat, 11 Jun 2011 22:54:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

On Sun, May 29 2011, AW wrote:

> as LuaTeX probably will become the successor to pdfTeX, I guess, adapting 
> AUCTeX to this is a must. The most important feature is syntax highlighting 
> of 
> both, LaTeX and Lua, in one or another way, when both are employed in the 
> same 
> file. More and more people will use Lua snippets in *.tex-files. 

Perhaps mumamo.el can help. Copied from my .emacs file:

--8<---------------cut here---------------start------------->8---
(require 'mumamo)
(mumamo-easy-make-chunk-fun mumamo-lua1-chunk
  "\\startlua" "\\stoplua" 'lua-mode)
(mumamo-easy-make-chunk-fun mumamo-lua2-chunk
  "\\startusercode" "\\stopusercode" 'lua-mode)
(mumamo-easy-make-chunk-fun mumamo-mp-chunk
  "\\startMP" "\\stopMP" 'metapost-mode)
(mumamo-easy-make-chunk-fun mumamo-c-chunk
  "\\startC\n" "\\stopC" 'c-mode)
(mumamo-easy-make-chunk-fun mumamo-make-chunk
  "\\startMake\n" "\\stopMake" 'makefile-mode)
(define-mumamo-turn-on context-lua-mp-c-make
  "ConTeXt mode with lua, mp, make and c."
  ("ConTeXt lua MP C Make" context-mode
   (mumamo-lua1-chunk mumamo-lua2-chunk mumamo-mp-chunk mumamo-c-chunk
                      mumamo-make-chunk)))
(add-to-list 'auto-mode-alist '("\\.tex$" . context-lua-mp-c-make))
--8<---------------cut here---------------end--------------->8---

-- 
           Peter




reply via email to

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