Comment 5 for bug 626039

Hello, using the latest devel version of mumamo through github. (2.09beta) and emacs 24.1.1.

I think I made some progress on this. I was trying to get mumamo get work with markdown-mode + R through ESS. I experienced the same lockups when editing R code chunks. I could fix it by specifying:

(setq mumamo-set-major-mode-delay -1)

 I believe this comes down to the fact that while there is a function in ESS called "R-mode", the actual major-mode variable is called "ess-mode". So mumumo sees the chunk is in "ess-mode"and thinks it *should-be* in R-mode, so tries to switch it. In mumamo.el, this line in mumamo-set-major-post-command

(set-it-now (not (or in-pre-hook (mumamo-fun-eq major major-mode)))))

will assign t to set-it-now even when it does not have to, because of this R-mode vs. ess-mode incongruence. I believe this is related to the infinite loop that mumamo ends up in without setting the mumamo-set-major-mode-delay as above.

I also currently get things like the following in my *Messages* buffer, even with setting the delay to -1:

Switched to ess-mode [3 times]

so I'm just going to remove the message function call that is generating those lines for now. I realize this does not fix the problem per se, but it makes it usable for me, and hopefully this helps track down the larger issue.

Thanks, mumamo is great!