* lisp/textmodes/reftex.el (reftex-compile-variables): Change the
section regexp so that it accepts lines starting with the comment
character. (tiny change)
* lisp/textmodes/reftex-parse.el (reftex-parse-from-file): Filter
gathered toc entries, accepting a commented entry if and only if the
source file is a ".dtx" file. (tiny change)
(when (eq (char-before) ?\\) (backward-char))
;; Insert in List
(setq toc-entry (funcall reftex-section-info-function file))
- (when toc-entry
+ (when (and toc-entry
+ (eq ;; Either both are t or both are nil.
+ (= (char-after bound) ?%)
+ (string-suffix-p ".dtx" file)))
;; It can happen that section info returns nil
(setq level (nth 5 toc-entry))
(setq highest-level (min highest-level level))
;; Calculate the regular expressions
(let* (
; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*")
- (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because
- ; match numbers are hard coded
+ (wbol "\\(^\\)%?[ \t]*") ; Need to keep the empty group because
+ ; match numbers are hard coded
(label-re (concat "\\(?:"
(mapconcat 'identity reftex-label-regexps "\\|")
"\\)"))