Consider a file with a .Rnw extension, with a LaTeX major mode, and Noweb and NWFL minor modes. The uncomment-region command works fine with general text and text-like environments (e.g., itemize). However, when calling uncomment-region on a region that includes a math environment (e.g., align, eqnarray), the entire Aquamacs process hangs, requiring a Force Quit. For example:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
On the following equation, try comment-region, and then uncomment-region. On my system, the uncomment-region call is what hangs the process.
\begin{align}
1+1=2
\end{align}
\end{document}
This problem occurs with Aquamacs 3.3 and 3.4dev (latest nightly build), but not Aquamacs 3.2, nor with non-Aquamacs emacs. It does occur with less versions 16.04 and 16.10.
When I toggle ess-noweb-font-lock-mode off, or even just toggle font-lock-mode on, the problem with uncomment-region disappears. So it looks like there is an issue with how ess-noweb-font-lock-mode interacts with Aquamacs. I don't know which. Of course, disabling ess-noweb-font-lock-mode means that I lose the font-lock features.
Can you help me resolve this problem?
Thanks,
Michael Braun
braunm at smu.edu