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

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

mmm-mode, python-mode and doctest-mode?


From: John J Lee
Subject: mmm-mode, python-mode and doctest-mode?
Date: Wed, 30 Nov 2005 17:43:27 +0000 (GMT Standard Time)

Is it possible to get doctest-mode to work with mmm-mode and python-mode nicely so that docstrings containing doctests are editable in doctest-mode?

In my utter e-lisp ignorance, I tried this:

(require 'mmm-auto)
(setq mmm-global-mode 'maybe)
(mmm-add-classes
 '(
   (doctest
    :submode doctest-mode
    :front "\"\"\""
    :back "\"\"\"")))
(mmm-add-mode-ext-class nil "\\.py$" 'doctest)

That has the following problems:

- Fails to set the background colour of the doctest-mode regions to the default mmm-mode gray (as documented by mmm-mode - and observed for another mmm class I have). Maybe an interaction with python-mode?

- Confuses python-mode: the face of docstrings sometimes fluctuates from second to second between the string face and the face of ordinary text (I assume the former face is python-mode's string face and the latter face is the doctest-mode English-text face)!


Any tips appreciated!


John




reply via email to

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