-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-flymake.el
executable file
·44 lines (34 loc) · 1.63 KB
/
init-flymake.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
(setq flymake-gui-warnings-enabled nil)
;;http://www.emacswiki.org/emacs/FlyMake
;;http://www.gnu.org/software/emacs/manual/html_node/flymake/index.html#Top
;; Stop flymake from breaking when ruby-mode is invoked by mmm-mode,
;; at which point buffer-file-name is nil
(eval-after-load 'flymake
'(progn
(require 'flymake-cursor)
(global-set-key (kbd "C-`") 'flymake-goto-next-error)
(defun flymake-can-syntax-check-file (file-name)
"Determine whether we can syntax check FILE-NAME.
Return nil if we cannot, non-nil if we can."
(if (and file-name (flymake-get-init-function file-name)) t nil))))
;; http://nschum.de/src/emacs/fringe-helper/
(eval-after-load 'flymake
'(progn
(require 'fringe-helper)
(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 'init-flymake)