From: Arash Esbati Date: Mon, 13 Feb 2017 08:22:12 +0000 (+0100) Subject: Match all characters in optional argument of \documentclass X-Git-Tag: emacs-26.0.90~839 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=271dcf8652ccf94d8582b2bcdb26f066d0b946a2;p=emacs.git 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. --- diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 18b35981f82..9754d2b20ff 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -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.