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

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

[elpa] externals/auctex 416f131 40/69: Catch LaTeX class warnings


From: Tassilo Horn
Subject: [elpa] externals/auctex 416f131 40/69: Catch LaTeX class warnings
Date: Sat, 26 Mar 2016 21:36:35 +0000

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

    Catch LaTeX class warnings
    
    * tex-buf.el (LaTeX-warnings-regexp): New variable.  This is the same
      regexp used before by `TeX-LaTeX-sentinel-has-warnings' and
      `TeX-parse-error', but now catches class warnings as well.
    (TeX-LaTeX-sentinel-has-warnings, TeX-parse-error): Use
    `LaTeX-warnings-regexp'.
---
 tex-buf.el |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index d44cbc7..0d924c7 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1389,13 +1389,16 @@ Return nil ifs no errors were found."
       (setq TeX-command-next TeX-command-Show))
     nil))
 
+(defvar LaTeX-warnings-regexp
+  "\\(?:LaTeX [-A-Za-z0-9]*\\|\\(?:Class\\|Package\\) [-A-Za-z0-9]+ 
\\)Warning:"
+  "Regexp matching LaTeX warnings.")
+
 (defun TeX-LaTeX-sentinel-has-warnings ()
   "Return non-nil, if the output buffer contains warnings.
 Warnings can be indicated by LaTeX or packages."
   (save-excursion
     (goto-char (point-min))
-    (re-search-forward
-     "^\\(LaTeX [-A-Za-z]*\\|Package [-A-Za-z0-9]+ \\)Warning:" nil t)))
+    (re-search-forward (concat "^" LaTeX-warnings-regexp) nil t)))
 
 (defun TeX-LaTeX-sentinel-has-bad-boxes ()
   "Return non-nil, if LaTeX output indicates overfull or underfull boxes."
@@ -2266,7 +2269,7 @@ Return non-nil if an error or warning is found."
          "^\\(\\(?:Overfull\\|Underfull\\|Tight\\|Loose\\)\
  \\\\.*?[0-9]+--[0-9]+\\)\\|"
          ;; LaTeX warning
-         "^\\(\\(?:LaTeX [-A-Za-z]*\\|Package [-A-Za-z0-9]+ \\)Warning:.*\\)"))
+         "^\\(" LaTeX-warnings-regexp ".*\\)"))
        (error-found nil))
     (while
        (cond



reply via email to

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