By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,767 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,767 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.