[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 433b5f9ee70411aa09e16
From: |
Ikumi Keita |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 433b5f9ee70411aa09e16b5de855e69c310448f1 |
Date: |
Sun, 10 Sep 2017 08:01:16 -0400 (EDT) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".
The branch, master has been updated
via 433b5f9ee70411aa09e16b5de855e69c310448f1 (commit)
from bfaa079a2836996a4733056c0c90daf3ad141c42 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 433b5f9ee70411aa09e16b5de855e69c310448f1
Author: Ikumi Keita <address@hidden>
Date: Sun Sep 10 21:00:01 2017 +0900
Parse package/class option with comments correctly
* latex.el: (LaTeX-auto-class-regexp-list): Replace the regexp for
RequirePackage/LoadClass option with the same one for usepackage.
* tests/latex/latex-test.el: Add test for the change above.
diff --git a/latex.el b/latex.el
index 8dc9fa3..76c15de 100644
--- a/latex.el
+++ b/latex.el
@@ -1530,14 +1530,14 @@ This is necessary since index entries may contain
commands and stuff.")
(defvar LaTeX-auto-class-regexp-list
'(;; \RequirePackage[<options>]{<package>}[<date>]
- ("\\\\Require\\(Package\\)\\(\\[\\([^#\\.%]*?\\)\\]\\)?\
+ ("\\\\Require\\(Package\\)\\(\\[\\([^\]\\]*\\)\\]\\)?\
{\\([^#\\.\n\r]+?\\)}"
(3 4 1) LaTeX-auto-style)
;; \RequirePackageWithOptions{<package>}[<date>],
("\\\\Require\\(Package\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}"
(2 3 1) LaTeX-auto-style)
;; \LoadClass[<options>]{<package>}[<date>]
- ("\\\\Load\\(Class\\)\\(\\[\\([^#\\.%]*?\\)\\]\\)?{\\([^#\\.\n\r]+?\\)}"
+ ("\\\\Load\\(Class\\)\\(\\[\\([^\]\\]*\\)\\]\\)?{\\([^#\\.\n\r]+?\\)}"
(3 4 1) LaTeX-auto-style)
;; \LoadClassWithOptions{<package>}[<date>]
("\\\\Load\\(Class\\)WithOptions\\(\\){\\([^#\\.\n\r]+?\\)}"
diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index 05ca2c8..a53d48e 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -165,4 +165,20 @@ last extension is stripped."
(LaTeX-bibliography-list))
'(("../foo-1.bar_2.qux3")))))
+(ert-deftest LaTeX-auto-class-regexp ()
+ "Check parsing optional argument with comment correctly.
+
+Test against RequirePackage."
+ (with-temp-buffer
+ (insert "\\RequirePackage[
+backend=biber % here is a comment
+]{biblatex}
+")
+ (latex-mode)
+ (let ((TeX-parse-self t))
+ (TeX-update-style t))
+ (should (member "biblatex" (TeX-style-list)))
+ (should (LaTeX-provided-package-options-member
+ "biblatex" "backend=biber"))))
+
;;; latex-test.el ends here
-----------------------------------------------------------------------
Summary of changes:
latex.el | 4 ++--
tests/latex/latex-test.el | 16 ++++++++++++++++
2 files changed, 18 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 433b5f9ee70411aa09e16b5de855e69c310448f1,
Ikumi Keita <=