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

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

[elpa] externals/auctex 8090c28 1/3: Fix some regexp issues reported by


From: Tassilo Horn
Subject: [elpa] externals/auctex 8090c28 1/3: Fix some regexp issues reported by relint.
Date: Tue, 5 May 2020 12:24:35 -0400 (EDT)

branch: externals/auctex
commit 8090c28bcbe05ab77d9c9f63706981b1ca90e5af
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Fix some regexp issues reported by relint.
    
    * latex.el (LaTeX-209-to-2e): Fix regexp issues reported by relint.
    * tex-buf.el (LaTeX-warnings-regexp, TeX-LaTeX-sentinel, TeX-parse-error):
    Dito.
---
 latex.el   | 12 ++++++------
 tex-buf.el |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/latex.el b/latex.el
index 1b6699e..7701eb3 100644
--- a/latex.el
+++ b/latex.el
@@ -6805,13 +6805,13 @@ function would return non-nil and `(match-string 1)' 
would return
     (goto-char (point-min))
     (if
        (search-forward-regexp
-        "\\documentstyle\\[\\([^]]*\\)\\]{\\([^}]*\\)}"
+        "\\\\documentstyle\\[\\([^]]*\\)\\]{\\([^}]*\\)}"
         (point-max) t)
        (setq optstr (TeX-match-buffer 1)
              docstyle (TeX-match-buffer 2)
              optlist (TeX-split-string "," optstr))
       (if (search-forward-regexp
-          "\\documentstyle{\\([^}]*\\)}"
+          "\\\\documentstyle{\\([^}]*\\)}"
           (point-max) t)
          (setq docstyle (TeX-match-buffer 1))
        (error "No documentstyle defined")))
@@ -6837,10 +6837,10 @@ function would return non-nil and `(match-string 1)' 
would return
                (mapconcat (lambda (x) x)
                           (nreverse 2epackages) "}\n\\usepackage{") "}\n"))
     (if (equal docstyle "slides")
-      (progn
-       (goto-char (point-min))
-       (while (re-search-forward "\\\\blackandwhite{" nil t)
-      (replace-match "\\\\input{" nil nil)))))
+        (progn
+         (goto-char (point-min))
+         (while (re-search-forward "\\\\blackandwhite{" nil t)
+            (replace-match "\\\\input{" nil nil)))))
   (TeX-normal-mode nil))
 
 (defun LaTeX-env-beginning-pos-col ()
diff --git a/tex-buf.el b/tex-buf.el
index 5f53661..7a4e0da 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1597,7 +1597,7 @@ Return nil ifs no errors were found."
 ;;   Package xyz123 Warning: ...
 ;;   Class xyz123 Warning: ...
 (defvar LaTeX-warnings-regexp
-  "\\(?:LaTeX\\|Class\\|Package\\|\*\\) [-A-Za-z0-9]* ?[Ww]arning:"
+  "\\(?:LaTeX\\|Class\\|Package\\|\\*\\) [-A-Za-z0-9]* ?[Ww]arning:"
   "Regexp matching LaTeX warnings.")
 
 (defun TeX-LaTeX-sentinel-has-warnings ()
@@ -1704,7 +1704,7 @@ Rerun to get mark in right position\\." nil t)
         (message
          "%s" "You should run LaTeX again to get TikZ marks in right position")
         (setq TeX-command-next TeX-command-default))
-       ((re-search-forward "^\* xsim warning: \"rerun\"" nil t)
+       ((re-search-forward "^\\* xsim warning: \"rerun\"" nil t)
         (message
          "%s" "You should run LaTeX again to synchronize exercise properties")
         (setq TeX-command-next TeX-command-default))
@@ -2588,7 +2588,7 @@ Return non-nil if an error or warning is found."
          ;; TeX error
          "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|"
          ;; New file
-         "(\n?\\([^\n())]+\\)\\|"
+         "(\n?\\([^\n()]+\\)\\|"
          ;; End of file.
          "\\()\\)\\|"
          ;; Hook to change line numbers



reply via email to

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