From 62df0fa87188a760f74d3f559ea8a519142f9a66 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 25 Mar 2014 22:30:19 +0900 Subject: [PATCH] fringe hack. --- elisp/ghc-check.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/elisp/ghc-check.el b/elisp/ghc-check.el index 858c5f8..c6910d7 100644 --- a/elisp/ghc-check.el +++ b/elisp/ghc-check.el @@ -34,6 +34,10 @@ "Face used for marking warning lines." :group 'ghc) +(defvar ghc-check-error-fringe (propertize "!" 'display '(left-fringe exclamation-mark))) + +(defvar ghc-check-warning-fringe (propertize "?" 'display '(left-fringe question-mark))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun ghc-check-syntax () @@ -109,8 +113,11 @@ (setq ovl (make-overlay beg end)) (overlay-put ovl 'ghc-check t) (overlay-put ovl 'ghc-file file) - (overlay-put ovl 'ghc-msg msg) ;; should be list - (let ((face (if err 'ghc-face-error 'ghc-face-warn))) + (overlay-put ovl 'ghc-msg msg) + ;; fixme tooltips + (let ((fringe (if err ghc-check-error-fringe ghc-check-warning-fringe)) + (face (if err 'ghc-face-error 'ghc-face-warn))) + (overlay-put ovl 'before-string fringe) (overlay-put ovl 'face face))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;