Skip to content

Commit bfab941

Browse files
committed
haskell-error-overlay-briefly: employ WITH-OVERLAY-PROPERTIES
1 parent e75d6e3 commit bfab941

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

haskell-load.el

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,12 @@ correspondingly-named overlay properties of OVL."
326326
(cl-first (sort (cl-copy-list ovls) 'overlay-start>))))
327327

328328
(defun haskell-error-overlay-briefly (ovl)
329-
(let ((text (overlay-get ovl 'haskell-msg))
330-
(type (overlay-get ovl 'haskell-msg-type)))
331-
(cond ((not (eq type 'warning))
332-
text)
333-
((string-prefix-p "Warning:\n " text)
334-
(cl-subseq text 13))
335-
(t (error "Invariant failed: a warning message from GHC has unexpected form: %s." text)))))
329+
(with-overlay-properties (haskell-msg haskell-msg-type) ovl
330+
(cond ((not (eq haskell-msg-type 'warning))
331+
haskell-msg)
332+
((string-prefix-p "Warning:\n " haskell-msg)
333+
(cl-subseq haskell-msg 13))
334+
(t (error "Invariant failed: a warning message from GHC has unexpected form: %s." haskell-msg)))))
336335

337336
(defun haskell-goto-error-overlay (ovl)
338337
(cond (ovl

0 commit comments

Comments
 (0)