[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 17115360b88ca23a69f63
From: |
Mosè Giordano |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 17115360b88ca23a69f6361477891681efeec6bf |
Date: |
Sun, 21 Feb 2016 18:50:35 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".
The branch, master has been updated
via 17115360b88ca23a69f6361477891681efeec6bf (commit)
from f1bcbe3ee6f66bff7f9ffd280829babf28ddf525 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 17115360b88ca23a69f6361477891681efeec6bf
Author: Mosè Giordano <address@hidden>
Date: Sun Feb 21 19:44:34 2016 +0100
Fix detection of line number in TeX-warning
* tex-buf.el (TeX-warning): Require as additional mandatory argument the
position where the warning starts. Use it to limit
`re-search-backward' when looking for the line number.
(TeX-parse-error): Provide additional argument to `TeX-warning'.
* tests/tex/compilation-log.txt: Add another case where the line number
of the warning was mistaken.
* tests/tex/error-parsing.el: Update expected result of the test
accordingly.
diff --git a/tests/tex/compilation-log.txt b/tests/tex/compilation-log.txt
index 7703865..2e8e00f 100644
--- a/tests/tex/compilation-log.txt
+++ b/tests/tex/compilation-log.txt
@@ -36,6 +36,9 @@ Underfull \hbox (badness 6608) in paragraph at lines 131--132
LaTeX Warning: Reference `wrong' on page 1 undefined on input line 4.
+LaTeX Font Warning: Font shape `OML/cmm/b/it' in size <5.5> not available
+(Font) size <5> substituted on input line 70.
+
[1{/opt/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./test.aux)
LaTeX Warning: There were undefined references.
diff --git a/tests/tex/error-parsing.el b/tests/tex/error-parsing.el
index 611ba8d..6251847 100644
--- a/tests/tex/error-parsing.el
+++ b/tests/tex/error-parsing.el
@@ -87,7 +87,10 @@ ABD: EveryShipout initializing macros"
0
"LaTeX Warning: Reference `wrong' on page 1 undefined on input
line 4.\n"
"wrong" 4 nil 1351 nil)
- (warning "./test.tex" 4 "LaTeX Warning: There were undefined
references."
- 0 "LaTeX Warning: There were undefined references.\n" nil 4 nil
1482 nil)))))
+ (warning "./test.tex" 70 "LaTeX Font Warning: Font shape
`OML/cmm/b/it' in size <5.5> not available"
+ 0 "LaTeX Font Warning: Font shape `OML/cmm/b/it' in size <5.5>
not available
+(Font) size <5> substituted on input line 70.\n" nil 70 nil 1485
nil)
+ (warning "./test.tex" nil "LaTeX Warning: There were undefined
references."
+ 0 "LaTeX Warning: There were undefined references.\n" nil nil
nil 1616 nil)))))
;;; error-parsing.el ends here
diff --git a/tex-buf.el b/tex-buf.el
index 655faeb..52483dc 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2362,7 +2362,7 @@ Return non-nil if an error or warning is found."
(if (or store TeX-debug-bad-boxes)
(progn
(setq error-found t)
- (TeX-warning (TeX-match-buffer 7) store)
+ (TeX-warning (TeX-match-buffer 7) (match-beginning 7) store)
nil)
(re-search-forward "\r?\n\
\\(?:.\\{79\\}\r?\n\
@@ -2375,7 +2375,7 @@ Return non-nil if an error or warning is found."
(if (or store TeX-debug-warnings)
(progn
(setq error-found t)
- (TeX-warning (TeX-match-buffer 8) store)
+ (TeX-warning (TeX-match-buffer 8) (match-beginning 8) store)
nil)
t))
@@ -2552,9 +2552,11 @@ information in `TeX-error-list' instead of displaying
the error."
;; Find the error point and display the help.
(apply 'TeX-find-display-help info-list))))
-(defun TeX-warning (warning &optional store)
+(defun TeX-warning (warning warning-start &optional store)
"Display a warning for WARNING.
+WARNING-START is the position where WARNING starts.
+
If optional argument STORE is non-nil, store the warning
information in `TeX-error-list' instead of displaying the
warning."
@@ -2568,8 +2570,10 @@ warning."
(word-string (if bad-box "[][\\W() ---]\\(\\w+\\)[][\\W() ---]*$"
"`\\(\\w+\\)'"))
- ;; Get error-line (warning).
- (line (when (save-excursion (re-search-backward line-string nil t))
+ ;; Get error-line (warning). Don't search before `warning-start' to
+ ;; avoid catching completely unrelated line numbers.
+ (line (when (save-excursion (re-search-backward line-string
+ warning-start t))
(string-to-number (TeX-match-buffer 1))))
(line-end (if bad-box (string-to-number (TeX-match-buffer 2))
line))
-----------------------------------------------------------------------
Summary of changes:
tests/tex/compilation-log.txt | 3 +++
tests/tex/error-parsing.el | 7 +++++--
tex-buf.el | 14 +++++++++-----
3 files changed, 17 insertions(+), 7 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 17115360b88ca23a69f6361477891681efeec6bf,
Mosè Giordano <=