emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 2fd59c9 60/69: Improve word-string regexp in TeX


From: Tassilo Horn
Subject: [elpa] externals/auctex 2fd59c9 60/69: Improve word-string regexp in TeX-warning
Date: Sat, 26 Mar 2016 21:36:37 +0000

branch: externals/auctex
commit 2fd59c93413440daddd585fc64230e2433f80008
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Improve word-string regexp in TeX-warning
    
    * tex-buf.el (TeX-warning): Match letters, numbers, colons, and hyphens,
      not just word constituents.  They may be preceeded by both grave
      accent and apostrophe, not only grave accent.
    * tests/tex/compilation-log.txt: Add test case.
    * tests/tex/error-parsing.el: Update result.
---
 tests/tex/compilation-log.txt |    2 ++
 tests/tex/error-parsing.el    |    6 +++++-
 tex-buf.el                    |    4 +++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
index f3d2b00..85e56c0 100644
--- a/tests/tex/compilation-log.txt
+++ b/tests/tex/compilation-log.txt
@@ -61,6 +61,8 @@ Overfull \hbox (13.59138pt too wide) in paragraph at lines 
367--368
 
 [93])
 
+LaTeX Warning: Citation 'Knuth:TeXbook-1984' undefined on input line 48.
+
 LaTeX Warning: There were undefined references.
 
 )
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index 2d0f282..f15f3ac 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -110,7 +110,11 @@ ABD: EveryShipout initializing macros"
              (bad-box "./file  name/with spaces.tex" 367 "Overfull \\hbox 
(13.59138pt too wide) in paragraph at lines 367--368"
               0 "\n[]\\T1/pplj/m/n/10.95 Un qua-dri-vet-to-re co-va-rian-te 
$\\OMS/zplm/m/n/10.95 f\\OML/zplm/m/it/10.95 A[]\\OMS/zplm/m/n/10.95 g$ 
\\T1/pplj/m/n/10.95 e un in-sie-me di quat-tro quan-ti-ta $\\OT1/zplm/m/n/10.95 
(\\OML/zplm/m/it/10.95 A[]; A[]; A[]; A[]\\OT1/zplm/m/n/10.95 )$" "$"
               368 t 2600 nil)
+             (warning "./test.tex" 48
+              "LaTeX Warning: Citation 'Knuth:TeXbook-1984' undefined on input 
line 48." 0
+              "LaTeX Warning: Citation 'Knuth:TeXbook-1984' undefined on input 
line 48.\n"
+              "Knuth:TeXbook-1984" 48 nil 2692 nil)
              (warning "./test.tex" nil "LaTeX Warning: There were undefined 
references."
-              0 "LaTeX Warning: There were undefined references.\n" nil nil 
nil 2667 nil)))))
+              0 "LaTeX Warning: There were undefined references.\n" nil nil 
nil 2741 nil)))))
 
 ;;; error-parsing.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 9a3662b..dca6614 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2574,7 +2574,9 @@ warning."
                        "on input line \\([0-9]*\\)\\."))
         ;; word-string: match 1 is the word
         (word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$"
-                       "`\\(\\w+\\)'"))
+                       ;; Match "ref" in both "Reference `ref' on page NN
+                       ;; undefined" and "Citation 'ref' on page NN undefined".
+                       "\\(?:`\\|'\\)\\([-a-zA-Z0-9:]+\\)'"))
 
         ;; Get error-line (warning).  Don't search before `warning-start' to
         ;; avoid catching completely unrelated line numbers.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]