diff options
| author | Chong Yidong | 2008-07-25 18:39:38 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-07-25 18:39:38 +0000 |
| commit | 1957b847ef31dabb860a08c335aaf9ab1ef6d1f2 (patch) | |
| tree | 63f6c3692296f5bcacaf98163ce0f22cc357df51 | |
| parent | 3a94227c2130cff1f6b895a2f318e621072ebe72 (diff) | |
| download | emacs-1957b847ef31dabb860a08c335aaf9ab1ef6d1f2.tar.gz emacs-1957b847ef31dabb860a08c335aaf9ab1ef6d1f2.zip | |
(tex-compilation-parse-errors): Check for
invalid filename strings when parsing tex errors (bug#376).
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 3f5aa2458a5..0a89a34ac45 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -2188,6 +2188,7 @@ for the error messages." | |||
| 2188 | (let* ((this-error (copy-marker begin-of-error)) | 2188 | (let* ((this-error (copy-marker begin-of-error)) |
| 2189 | (linenum (string-to-number (match-string 1))) | 2189 | (linenum (string-to-number (match-string 1))) |
| 2190 | (error-text (regexp-quote (match-string 3))) | 2190 | (error-text (regexp-quote (match-string 3))) |
| 2191 | try-filename | ||
| 2191 | (filename | 2192 | (filename |
| 2192 | ;; Prefer --file-liner-error filename if we have it. | 2193 | ;; Prefer --file-liner-error filename if we have it. |
| 2193 | (or errfilename | 2194 | (or errfilename |
| @@ -2195,7 +2196,11 @@ for the error messages." | |||
| 2195 | (with-syntax-table tex-error-parse-syntax-table | 2196 | (with-syntax-table tex-error-parse-syntax-table |
| 2196 | (backward-up-list 1) | 2197 | (backward-up-list 1) |
| 2197 | (skip-syntax-forward "(_") | 2198 | (skip-syntax-forward "(_") |
| 2198 | (while (not (file-readable-p (thing-at-point 'filename))) | 2199 | (while (not |
| 2200 | (and (setq try-filename (thing-at-point | ||
| 2201 | 'filename)) | ||
| 2202 | (not (string= "" try-filename)) | ||
| 2203 | (file-readable-p try-filename))) | ||
| 2199 | (skip-syntax-backward "(_") | 2204 | (skip-syntax-backward "(_") |
| 2200 | (backward-up-list 1) | 2205 | (backward-up-list 1) |
| 2201 | (skip-syntax-forward "(_")) | 2206 | (skip-syntax-forward "(_")) |