[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d47a6e87 1/2: Support complex \input path (bug#55511)
From: |
Ikumi Keita |
Subject: |
master d47a6e87 1/2: Support complex \input path (bug#55511) |
Date: |
Mon, 23 May 2022 04:12:15 -0400 (EDT) |
branch: master
commit d47a6e87160efc133c534f20969a03bbe2802a41
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Support complex \input path (bug#55511)
* latex.el (LaTeX-auto-regexp-list): Allow ".." to appear more than
once in an argument of \input.
Support path surrounded by double quotes.
* tex.el (plain-TeX-auto-regexp-list): Allow ".." to appear more than
once in an argument of \input.
(TeX-auto-file): Defvar properly.
---
latex.el | 3 +--
tex.el | 6 +++++-
2 files changed, 6 insertions(+), 3 deletions(-)
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)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d47a6e87 1/2: Support complex \input path (bug#55511),
Ikumi Keita <=