[Top][All Lists]

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

Re: [AUCTeX] AUCTEX with multiple modes

From: Ivan Andrus
Subject: Re: [AUCTeX] AUCTEX with multiple modes
Date: Thu, 14 Aug 2014 10:25:57 -0600

I recently added mmm-mode support (written by Dan Drake [1]) to sage-mode:

;;; provide MMM (multiple major mode) support
(eval-after-load 'mmm-auto
:submode sage-mode
:delimiter-mode nil
:front "\\\\begin{sage\\(block\\|silent\\|verbatim\\|example\\|commandline\\)}"
:back "\\\\end{sage~1}"
:save-matches 1)))
    (mmm-add-mode-ext-class nil "\\.tex\\'" 'sagetex)
    (unless mmm-global-mode
      (message "Multiple modes not enabled, please customize `mmm-global-mode' to enable."))))

It seems to work fairly well, and it was pretty easy to setup.



On Aug 14, 2014, at 6:23 AM, Vincent Belaïche <address@hidden> wrote:

As far as I can understand you are sort of embedding Maxima code into LaTeX
code and you would like the Maxima edit mode for the pieces of Maxima codes

I think that the same sort of thing is needed for Asymptote
(, not sure how/whether they handle it.
Maybe you should investigate whether people with similar problems have found
any standard solution to do it.


From: address@hidden
To: address@hidden
Date: Thu, 13 Mar 2014 09:59:03 +0100
Subject: [AUCTeX] AUCTEX with multiple modes


After playing around with emaxima-mode (a mode that extends AUCTeX to
mix in Maxima code that can be evaluated, it has not been mainteined for
a while) I came to the conclusion that getting a comfy environment out
of it would involve a lot of hacking. For example, to support M-;, I
need to implement my own comment function that checks if I am in a
maxima environment, and dispatch to comment-dwim accordingly (either
LaTeX-style % comments or Maxima-style /* */ comments). I would need to
do this for other functionality (font locking, indentation, etc) and it
would involve a lot of boilerplate code. So I am exploring other
solutions, and I came across Multiple Modes [1].

I notice that there are several implementations. Is there one which is
preferred for AUCTeX? Can someone please direct me to an example of
multiple modes in AUCTeX?




auctex mailing list
auctex mailing list

reply via email to

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