]> git.eshelyaron.com Git - emacs.git/commitdiff
(tex-compilation-parse-errors): Check for
authorChong Yidong <cyd@stupidchicken.com>
Fri, 25 Jul 2008 18:39:38 +0000 (18:39 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 25 Jul 2008 18:39:38 +0000 (18:39 +0000)
invalid filename strings when parsing tex errors (bug#376).

lisp/textmodes/tex-mode.el

index 3f5aa2458a5e0a80a78a64ec4e1a5471e162c2bb..0a89a34ac4581da1455c8a7ea2851eba09122355 100644 (file)
@@ -2188,6 +2188,7 @@ for the error messages."
       (let* ((this-error (copy-marker begin-of-error))
             (linenum (string-to-number (match-string 1)))
             (error-text (regexp-quote (match-string 3)))
+            try-filename
             (filename
              ;; Prefer --file-liner-error filename if we have it.
              (or errfilename
@@ -2195,7 +2196,11 @@ for the error messages."
                    (with-syntax-table tex-error-parse-syntax-table
                      (backward-up-list 1)
                      (skip-syntax-forward "(_")
-                     (while (not (file-readable-p (thing-at-point 'filename)))
+                     (while (not 
+                             (and (setq try-filename (thing-at-point
+                                                      'filename))
+                                  (not (string= "" try-filename))
+                                  (file-readable-p try-filename)))
                        (skip-syntax-backward "(_")
                        (backward-up-list 1)
                        (skip-syntax-forward "(_"))