diff options
author | Sašo Živanović <saso.zivanovic@guest.arnes.si> | 2016-12-30 11:12:42 +0100 |
---|---|---|
committer | Tassilo Horn <tsdh@gnu.org> | 2017-01-02 13:11:49 +0100 |
commit | 1e8bb313eaa98928dc258f4b903bb10c33c21642 (patch) | |
tree | aa89bdc6986080f3500bc79ccd955e39ec14f05a /lisp/textmodes/reftex-parse.el | |
parent | 367dadf5541f3cc10ba992efb885bd259246ca66 (diff) | |
download | emacs-1e8bb313eaa98928dc258f4b903bb10c33c21642.tar.gz |
Fix RefTeX to show table of contents for dtx files (tiny change)
* 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)
Diffstat (limited to 'lisp/textmodes/reftex-parse.el')
-rw-r--r-- | lisp/textmodes/reftex-parse.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index a2de4166d24..af2810d72e8 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -270,7 +270,10 @@ of master file." (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)) |