← Back to team overview

nxhtml team mailing list archive

Re: [Question #232313]: A set the mode from one regex to some other regexp

 

Question #232313 on nXhtml changed:
https://answers.launchpad.net/nxhtml/+question/232313

Boris Kheyfets gave more information on the question:
Seem like there's no way to add formatting to the question. So I re-ask
it in plain text:

Here's a way to make latex mode from: ``.. math::\n\n`` to ``..``:

.. code-block:: cl

   (defun rst-bk-latex-directive-chunk (pos min max)
     "Find math chunks.  Return range and 'latex-mode.
   See `mumamo-find-possible-chunk' for POS, MIN and MAX."
     (mumamo-quick-static-chunk pos min max ".. math::\n\n" ".." nil 'latex-mode t))

   ;;;###autoload
   (define-mumamo-multi-major-mode rst-bk-mumamo-mode
    "Turn on multiple major modes for Python with RestructuredText docstrings."
    ("ReST" rst-mode
     (
      rst-bk-latex-directive-chunk
      )))

Can You please provide a snippet to make it from regexp, to regexp?

-- 
You received this question notification because you are a member of
nXhtml, which is an answer contact for nXhtml.