auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] [elpa] externals/auctex 17d1a5d 36/69: ; Merge branch 'si


From: Tassilo Horn
Subject: [AUCTeX-devel] [elpa] externals/auctex 17d1a5d 36/69: ; Merge branch 'simplify-TeX-parse-error'
Date: Sat, 26 Mar 2016 21:36:35 +0000

branch: externals/auctex
commit 17d1a5d71f9fb6adbb90e17dbf223f3bf1e2f92a
Merge: f9efa73 1950012
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    ; Merge branch 'simplify-TeX-parse-error'
---
 tex-buf.el |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index a8ba024..3478590 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1742,15 +1742,18 @@ command."
        (goto-char pt)
        (insert-before-markers string)
        (set-marker (process-mark process) (point))
-       ;; Remove line breaks at column 79
+       ;; Remove line breaks at columns 79 and 80
        (while (> (point) pt)
          (end-of-line 0)
-         (when (and (= (- (point) (line-beginning-position)) 79)
-                    ;; Heuristic: Don't delete the linebreak if the
-                    ;; next line is empty or starts with an opening
-                    ;; parenthesis or if point is located after a period.
+         (when (and (memql (- (point) (line-beginning-position)) '(79 80))
+                    ;; Heuristic: Don't delete the linebreak if the next line
+                    ;; is empty or starts with an opening parenthesis, or if
+                    ;; point is located after a period and in the next line no
+                    ;; word char follows.
                     (not (memq (char-after (1+ (point))) '(?
 ?\()))
-                    (not (eq (char-before) ?.)))
+                    (not (and (eq (char-before) ?.)
+                              (char-after (1+ (point)))
+                              (not (eq ?w (char-syntax (char-after (1+ 
(point)))))))))
            (delete-char 1)))
        (goto-char (marker-position (process-mark process)))
        ;; Determine current page
@@ -2252,16 +2255,9 @@ Return non-nil if an error or warning is found."
          ;; TeX error
          "^\(!\|\(.*?\):[0-9]+:\) \|"
          ;; New file
-         "(\(\"[^\"]*?\"\|/*\
-\(?:\.+[^()
{} \/]*\|[^()
{} .\/]+\
-\(?: [^()
{} .\/]+\)*\(?:\.[-0-9a-zA-Z_.]*\)?\)\
-\(?:[\/]+\(?:\.+[^()
{} \/]*\|[^()
{} .\/]+\
-\(?: [^()
{} .\/]+\)*\(?:\.[-0-9a-zA-Z_.]*\)?\)?\)*\)\
-)*\(?: \|
?$\)\|"
-         ;; End of file.  The [^:] skips package messages like:
-         ;; Package hyperref Message: Driver (autodetected): hpdftex.
-         ;; [Loading MPS to PDF converter (version 2006.09.02).]
-         "\()\)[^:.]\|"
+         "(
?\([^
())]+\)\|"
+         ;; End of file.
+         "\()\)\|"
          ;; Hook to change line numbers
          " !\(?:offset(\([---0-9]+\))\|"
          ;; Hook to change file name
@@ -2321,9 +2317,13 @@ Return non-nil if an error or warning is found."
                (end (match-end 3)))
            ;; Strip quotation marks and remove newlines if necessary
            (when (or (eq (string-to-char file) ?\")
-                     (string-match "
" file))
-             (setq file
-                   (mapconcat 'identity (split-string file "[\"
]+") "")))
+                     (string-match "[  
]" file))
+             (setq file (mapconcat 'identity (split-string file "[\"
]+") "")))
+           ;; Trim whitespace at the front/end
+           (setq file
+                 (progn
+                   (string-match 
"^[[:space:]]*\(.*[^[:space:]]\)[[:space:]]*$" file)
+                   (match-string 1 file)))
            (push file TeX-error-file)
            (push nil TeX-error-offset)
            (goto-char end))



reply via email to

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