]> git.eshelyaron.com Git - emacs.git/commitdiff
Match all characters in optional argument of \documentclass
authorArash Esbati <arash@gnu.org>
Mon, 13 Feb 2017 08:22:12 +0000 (09:22 +0100)
committerTassilo Horn <tsdh@gnu.org>
Mon, 13 Feb 2017 16:07:12 +0000 (17:07 +0100)
* lisp/textmodes/reftex.el (reftex-TeX-master-file): Match all
characters in optional argument containing name of the main file.

lisp/textmodes/reftex.el

index 18b35981f82249d138c224a724fe7762631c5112..9754d2b20ff6ee3745db5bc47c58c9b8c0d3d1af 100644 (file)
@@ -352,7 +352,7 @@ If the symbols for the current master file do not exist, they are created."
         ((save-excursion
             (goto-char (point-min))
             (re-search-forward
-             "^[[:space:]]*\\\\documentclass\\[\\([[:word:].]+\\)\\]{subfiles}"
+             "^[[:space:]]*\\\\documentclass\\[\\([^]]+\\)\\]{subfiles}"
              nil t))
           (match-string-no-properties 1))
          ;; AUCTeX is loaded.  Use its mechanism.