@@ -294,10 +294,33 @@ actual Emacs buffer of the module being loaded."
294
294
(defvar haskell-check-warning-fringe (propertize " ?" 'display '(left-fringe question-mark)))
295
295
(defvar haskell-check-hole-fringe (propertize " _" 'display '(left-fringe horizontal-bar)))
296
296
297
+ (defun haskell-check-overlay-p (ovl )
298
+ (overlay-get ovl 'haskell-check ))
299
+
297
300
(defun haskell-check-remove-overlays (buffer )
298
301
(with-current-buffer buffer
299
302
(remove-overlays (point-min ) (point-max ) 'haskell-check t )))
300
303
304
+ (defun haskell-goto-prev-error ()
305
+ (interactive )
306
+ (let* ((here (point ))
307
+ (ovls0 (remove-if-not 'haskell-check-overlay-p (overlays-at here)))
308
+ (end (if ovls0 (overlay-start (car ovls0)) here))
309
+ (ovls1 (overlays-in (point-min ) end))
310
+ (ovls2 (remove-if-not 'haskell-check-overlay-p ovls1))
311
+ (pnts (mapcar 'overlay-start ovls2)))
312
+ (if pnts (goto-char (apply 'max pnts)))))
313
+
314
+ (defun haskell-goto-next-error ()
315
+ (interactive )
316
+ (let* ((here (point ))
317
+ (ovls0 (remove-if-not 'haskell-check-overlay-p (overlays-at here)))
318
+ (beg (if ovls0 (overlay-end (car ovls0)) here))
319
+ (ovls1 (overlays-in beg (point-max )))
320
+ (ovls2 (remove-if-not 'haskell-check-overlay-p ovls1))
321
+ (pnts (mapcar 'overlay-start ovls2)))
322
+ (if pnts (goto-char (apply 'min pnts)))))
323
+
301
324
(defun haskell-check-paint-overlay (buffer error-from-this-file-p line msg file err hole coln )
302
325
(with-current-buffer buffer
303
326
(let (beg end)
0 commit comments