[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex f676608 5/7: Fix parsing of LaTeX2e date formats
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex f676608 5/7: Fix parsing of LaTeX2e date formats |
Date: |
Fri, 21 Apr 2017 10:59:08 -0400 (EDT) |
branch: externals/auctex
commit f676608d578a98986365f658d2c179987f1ba4e3
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>
Fix parsing of LaTeX2e date formats
* tex-buf.el (TeX-LaTeX-sentinel): Support ISO date format, now used by
LaTeX2e. Reported by Uwe Siart.
* tests/tex/error-parsing.el (TeX-LaTeX2e-date): Add a test for LaTeX2e date
formats.
---
tests/tex/error-parsing.el | 22 ++++++++++++++++++++++
tex-buf.el | 2 +-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index f15f3ac..ed34409 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -117,4 +117,26 @@ ABD: EveryShipout initializing macros"
(warning "./test.tex" nil "LaTeX Warning: There were undefined
references."
0 "LaTeX Warning: There were undefined references.\n" nil nil
nil 2741 nil)))))
+;; See https://lists.gnu.org/archive/html/auctex/2017-04/msg00007.html.
+(ert-deftest TeX-LaTeX2e-date ()
+ "Test parsing of different LaTeX2e date formats."
+ (should
+ (equal
+ (with-temp-buffer
+ (insert "LaTeX2e <2017-04-15>")
+ (goto-char (point-min))
+ (let ((TeX-command-buffer (buffer-name)))
+ (TeX-LaTeX-sentinel nil "LaTeX")
+ TeX-command-next))
+ "View"))
+ (should
+ (equal
+ (with-temp-buffer
+ (insert "LaTeX2e <2017/01/01> patch level 3")
+ (goto-char (point-min))
+ (let ((TeX-command-buffer (buffer-name)))
+ (TeX-LaTeX-sentinel nil "LaTeX")
+ TeX-command-next))
+ "View")))
+
;;; error-parsing.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 759aa35..8c9c7ef 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1582,7 +1582,7 @@ Rerun to get mark in right position\\." nil t)
(setq TeX-command-next TeX-command-default))
((re-search-forward
"^\\(\\*\\* \\)?J?I?p?\\(La\\|Sli\\)TeX\\(2e\\)? \
-\\(Version\\|ver\\.\\|<[0-9/]*\\(?:u[^>]*\\)?>\\)" nil t)
+\\(Version\\|ver\\.\\|<[0-9/-]*\\(?:u[^>]*\\)?>\\)" nil t)
(let* ((warnings (and TeX-debug-warnings
(TeX-LaTeX-sentinel-has-warnings)))
(bad-boxes (and TeX-debug-bad-boxes
- [elpa] externals/auctex updated (2006ac9 -> 3edf068), Tassilo Horn, 2017/04/21
- [elpa] externals/auctex 08930b5 4/7: Improve error handling for Japanese users, Tassilo Horn, 2017/04/21
- [elpa] externals/auctex 865906c 2/7: Support upmendex, Tassilo Horn, 2017/04/21
- [elpa] externals/auctex f676608 5/7: Fix parsing of LaTeX2e date formats,
Tassilo Horn <=
- [elpa] externals/auctex 0c15e6c 6/7: Do not highlight thin spaces with \,, Tassilo Horn, 2017/04/21
- [elpa] externals/auctex 3320d1e 1/7: Improve command highlighting to not be triggered by hyphenation, Tassilo Horn, 2017/04/21
- [elpa] externals/auctex c872521 3/7: Deal with strange file name, Tassilo Horn, 2017/04/21
- [elpa] externals/auctex 3edf068 7/7: Merge branch 'master' into externals/auctex, Tassilo Horn, 2017/04/21