467,150 Members | 1,125 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,150 developers. It's quick & easy.

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

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
Nov 30 '05 #1
  • viewed: 1819
Share:
3 Replies
John J Lee wrote:
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....

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Dec 1 '05 #2
bruno at modulix <on***@xiludom.gro> writes:
John J Lee wrote:
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....


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

Dec 1 '05 #3
John J. Lee wrote:
bruno at modulix <on***@xiludom.gro> writes:

John J Lee wrote:
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? (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),


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.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'on***@xiludom.gro'.split('@')])"
Dec 1 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by yer darn tootin | last post: by
9 posts views Thread by vinod.bhavnani@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.