branch: externals/auctex commit 0d26aba1be73d6d615baa20525d43eb893b740b3 Author: Mosè Giordano <m...@gnu.org> Commit: Mosè Giordano <m...@gnu.org>
Suggest to display warnings when there are no errors in error overview * tex-buf.el (TeX-error-overview): When there are no errors, suggest to display warnings and bad boxes, if present. Fixes bug #24877. --- tex-buf.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tex-buf.el b/tex-buf.el index d9648f8..07bb78b 100644 --- a/tex-buf.el +++ b/tex-buf.el @@ -3677,7 +3677,21 @@ forward, if negative)." TeX-error-overview-buffer-name) (set-window-dedicated-p (selected-window) t)) (TeX-pop-to-buffer TeX-error-overview-buffer-name)))) - (error "No error or warning to show")) + (error (concat "No error or warning to show" + ;; Suggest to display warnings and bad boxes with the + ;; appropriate key-bindings if there are such + ;; messages in the output buffer. Rationale of the + ;; test: `TeX-error-overview-list-entries' is nil, + ;; but if `TeX-error-list' is not nil it means that + ;; there are hidden warnings/bad boxes. + (when (TeX-process-get-variable (TeX-active-master) + 'TeX-error-list) + (format ". Type `%s' and `%s' to display \ +warnings and bad boxes" + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-toggle-debug-warnings]") + (substitute-command-keys + "\\<TeX-mode-map>\\[TeX-toggle-debug-bad-boxes]")))))) (error "No process for this document")) (error "Error overview is available only in Emacs 24 or later")))