[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/caml 5f8dd3f 113/197: PR#4440 added function to skip
From: |
Stefan Monnier |
Subject: |
[nongnu] externals/caml 5f8dd3f 113/197: PR#4440 added function to skip warnings and jump to error |
Date: |
Sat, 21 Nov 2020 01:19:49 -0500 (EST) |
branch: externals/caml
commit 5f8dd3f4951d4c175ca9f080b92e40cbc3402f4a
Author: Damien Doligez <damien.doligez-inria.fr>
Commit: Damien Doligez <damien.doligez-inria.fr>
PR#4440 added function to skip warnings and jump to error
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8704
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
caml.el | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/caml.el b/caml.el
index 965cc78..1c8957c 100644
--- a/caml.el
+++ b/caml.el
@@ -809,6 +809,7 @@ from an error message produced by camlc.")
;; Wrapper around next-error.
(defvar caml-error-overlay nil)
+(defvar caml-next-error-skip-warnings-flag nil)
;;itz 04-21-96 somebody didn't get the documetation for next-error
;;right. When the optional argument is a number n, it should move
@@ -825,7 +826,7 @@ fragment. The erroneous fragment is also temporarily
highlighted if
possible."
(if (eq major-mode 'caml-mode)
- (let (bol beg end)
+ (let (skip bol beg end)
(save-excursion
(set-buffer
(if (boundp 'compilation-last-buffer)
@@ -839,8 +840,15 @@ possible."
(buffer-substring (match-beginning 1) (match-end 1)))
end
(string-to-int
- (buffer-substring (match-beginning 2) (match-end 2)))))))
- (cond (beg
+ (buffer-substring (match-beginning 2) (match-end 2)))))
+ (next-line)
+ (beginning-of-line)
+ (if (and (looking-at "Warning")
+ caml-next-error-skip-warnings-flag)
+ (setq skip 't))))
+ (cond
+ (skip (next-error))
+ (beg
(setq end (- end beg))
(beginning-of-line)
(forward-byte beg)
@@ -860,6 +868,14 @@ possible."
(sit-for 60))
(delete-overlay caml-error-overlay)))))))))
+(defun caml-next-error-skip-warnings (&rest args)
+ (let ((old-flag caml-next-error-skip-warnings-flag))
+ (unwind-protect
+ (progn (setq caml-next-error-skip-warnings-flag 't)
+ (apply 'next-error args))
+ (setq caml-next-error-skip-warnings-flag old-flag))))
+
+
;; Usual match-string doesn't work properly with font-lock-mode
;; on some emacs.
- [nongnu] externals/caml f751b4c 091/197: NOCOMPILE pour installer sans compiler (suggestion de Sven Luther), (continued)
- [nongnu] externals/caml f751b4c 091/197: NOCOMPILE pour installer sans compiler (suggestion de Sven Luther), Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 0a4f815 093/197: Fix hilitghting of largest well-typed expr surrounding point., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml b19dc86 092/197: pour que ca marche avec camlp4, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 6f9f060 096/197: caml-types:, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml bcd8c14 097/197: Retrait des messages de debugging..., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 70cc99c 101/197: - Mouse navigation in a caml-help window does not open another window, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml ad3e9c2 105/197: Ajout de camldebug dans le menu Caml d'emacs., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 92e4789 104/197: indentation of comments, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 111e6db 109/197: nettoyage, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml e32742a 111/197: ajout des annotations pour variables et appels terminaux, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 5f8dd3f 113/197: PR#4440 added function to skip warnings and jump to error,
Stefan Monnier <=
- [nongnu] externals/caml a688081 114/197: PR#4469 enhanced caml-set-compile-command, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 99e7ea3 119/197: merge changes from 3.10.2merged to 3.11.0, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 51b6e03 120/197: merge changes from release/3.11.1 to release/3.11.2, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml d1fc793 125/197: Added save-excursion to ocaml-link-activate., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 97316f7 130/197: renaming of Objective Caml to OCaml and cleanup of copyright headers, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 42d2eda 126/197: Fixed caml-help (would loose the position of the symbol search for)., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 49653b2 148/197: remove all $Id keywords, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 9b0544f 154/197: fix whitespace and over-long lines, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml da654aa 179/197: Emacs: Modernise font face definitions, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml cd1142f 187/197: Change camlc → ocamlc, Stefan Monnier, 2020/11/21