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

J

John J Lee

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
 
B

bruno at modulix

John said:
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?

I don't know.

(snip)
Any tips appreciated!

Seems like comp.emacs could be a good place for this question....
 
J

John J. Lee

bruno at modulix said:
I don't know.

(snip)

Seems like comp.emacs could be a good place for this question....

I've only posted to gnu.emacs.help previously (the message you reply
to was cross-posted there), since the name seemed to suggest
friendliness to people like me who use emacs a lot but are clueless
with elisp :). But thinking again I guess comp.emacs is just the
general emacs group, while gnu.emacs.help is the GNU-specific one?


John
 
B

bruno at modulix

John said:
I've only posted to gnu.emacs.help previously (the message you reply
to was cross-posted there),

Sorry, did not see that. But then you should have set the follow-up there.
since the name seemed to suggest
friendliness to people like me who use emacs a lot but are clueless
with elisp :)

You can script your emacs with Python too.
. But thinking again I guess comp.emacs is just the
general emacs group, while gnu.emacs.help is the GNU-specific one?

Probably. I must say I don't spend that much time configuring my
emacs... Changing mode manually when needed is ok for me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top