File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -317,9 +317,23 @@ actual Emacs buffer of the module being loaded."
317
317
(let ((ovls (cl-remove-if-not test (overlays-in beg end))))
318
318
(cl-first (sort (cl-copy-list ovls) 'overlay-start> ))))
319
319
320
+ (defun string/starts-with (string prefix )
321
+ " Return t if STRING starts with prefix."
322
+ (and (string-match (rx-to-string `(: bos , prefix ) t )
323
+ string)
324
+ t ))
325
+
326
+ (defun haskell-error-overlay-briefly (ovl )
327
+ (let ((text (overlay-get ovl 'haskell-msg ))
328
+ (type (overlay-get ovl 'haskell-msg-type )))
329
+ (if (eq type 'warning )
330
+ (cl-subseq text 13 )
331
+ text)))
332
+
320
333
(defun haskell-goto-error-overlay (ovl )
321
334
(cond (ovl
322
- (goto-char (overlay-start ovl)))
335
+ (goto-char (overlay-start ovl))
336
+ (haskell-mode-message-line (haskell-error-overlay-briefly ovl)))
323
337
(t
324
338
(message " No further notes from Haskell compiler. " ))))
325
339
@@ -362,6 +376,7 @@ actual Emacs buffer of the module being loaded."
362
376
(overlay-put ovl 'haskell-check t )
363
377
(overlay-put ovl 'haskell-file file)
364
378
(overlay-put ovl 'haskell-msg msg)
379
+ (overlay-put ovl 'haskell-msg-type type)
365
380
(overlay-put ovl 'help-echo msg)
366
381
(overlay-put ovl 'haskell-hole hole)
367
382
(cl-destructuring-bind (face fringe ) (cl-case type
You can’t perform that action at this time.
0 commit comments