>From 19541d95dcfcd167f4cf729434341b630bba0e1b Mon Sep 17 00:00:00 2001 From: Arash Esbati
Date: Mon, 13 Feb 2017 09:22:12 +0100 Subject: [PATCH] Match all characters in optional argument of \documentclass * lisp/textmodes/reftex.el (reftex-TeX-master-file): Match all characters in optional argument containing name of the main file. --- lisp/textmodes/reftex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 18b35981f8..9754d2b20f 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -352,7 +352,7 @@ reftex-TeX-master-file ((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. -- 2.11.0