Skip to content

Instantly share code, notes, and snippets.

@bkudria
Created December 29, 2010 21:56
Show Gist options
  • Save bkudria/759130 to your computer and use it in GitHub Desktop.
Save bkudria/759130 to your computer and use it in GitHub Desktop.
Add icons in the fringe, for flymake
(require 'fringe-helper)
(require 'flymake)
(defvar flymake-fringe-overlays nil)
(make-variable-buffer-local 'flymake-fringe-overlays)
(defadvice flymake-make-overlay (after add-to-fringe first
(beg end tooltip-text face mouse-face)
activate compile)
(push (fringe-helper-insert-region
beg end
(fringe-lib-load (if (eq face 'flymake-errline)
fringe-lib-exclamation-mark
fringe-lib-question-mark))
'left-fringe 'font-lock-warning-face)
flymake-fringe-overlays))
(defadvice flymake-delete-own-overlays (after remove-from-fringe activate
compile)
(mapc 'fringe-helper-remove flymake-fringe-overlays)
(setq flymake-fringe-overlays nil))
(provide 'flymake-fringe-icons)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment