I've fixed a tiny bug in RefTeX: TOC was not shown for dtx files. Dtx files mix code and documentation. Any comment with the comment character at the beginning of the line is considered a part of the docs. The regexp gathering sections allowed only whitespace before the section command. I've changed this so that now, the comment character is also allowed at the very beginning. In the parser code, I've added a filter that accepts only commented lines for dtx files and only uncommented ones for other files. I've relied on the file name (ending in ".dtx", obviously), to detect dtx files. Using the major mode (doctex-mode or not) of the file that is currently visited does not work, as a tex file can input a dtx file, or vice versa. Maybe there's a way to also check file variables of included files, but I don't know about it, and it would probably be an overkill, anyway. Best, Sašo