diff --git a/latex.el b/latex.el index 8bdbc94b..a6a775a8 100644 --- a/latex.el +++ b/latex.el @@ -52,7 +52,6 @@ ;; Silence the compiler for variables: (defvar outline-heading-alist) -(defvar TeX-auto-file) (defvar LaTeX-section-list-changed) ;;; Syntax @@ -1779,7 +1778,7 @@ This is necessary since index entries may contain commands and stuff.") ("\\\\newenvironment\\*?{\\([^}]+\\)}" 1 LaTeX-auto-environment) (,(concat "\\\\newtheorem{\\(" token "+\\)}") 1 LaTeX-auto-environment) - ("\\\\input{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}" + ("\\\\input{\"?\\([^#}%\"\\\n\r]+?\\)\\(?:\\.[^#}%/\"\\.\n\r]+\\)?\"?}" 1 TeX-auto-file) ("\\\\include{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}" 1 TeX-auto-file) diff --git a/tex.el b/tex.el index 1a3338c7..8b76f98d 100644 --- a/tex.el +++ b/tex.el @@ -3841,6 +3841,10 @@ The algorithm is as follows: (defconst TeX-auto-parser-local 3) (defconst TeX-auto-parser-change 4) +(defvar TeX-auto-file nil) +;; Internal temporal variable. Don't refer to it in your program +;; unless you know what you are doing. Use (TeX-style-list) instead. + (defun TeX-auto-add-information (name entries) "For NAME in `TeX-auto-parser' add ENTRIES." (let* ((entry (assoc name TeX-auto-parser)) @@ -4227,7 +4231,7 @@ alter the numbering of any ordinary, non-shy groups.") 1 TeX-auto-symbol) (,(concat "\\\\newfont{?\\\\\\(" token "+\\)}?") 1 TeX-auto-symbol) (,(concat "\\\\typein\\[\\\\\\(" token "+\\)\\]") 1 TeX-auto-symbol) - ("\\\\input +\\(\\.*[^#%\\\\\\.\n\r]+\\)\\(\\.[^#%\\\\\\.\n\r]+\\)?" + ("\\\\input +\\([^#}%\"\\\n\r]+?\\)\\(?:\\.[^#}%/\"\\.\n\r]+\\)?" 1 TeX-auto-file) (,(concat "\\\\mathchardef\\\\\\(" token "+\\)[^a-zA-Z@]") 1 TeX-auto-symbol)))