This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/init-package/init-flymake.el
2013-04-13 18:11:24 -04:00

26 lines
1 KiB
EmacsLisp

(require 'flymake)
;; from http://stackoverflow.com/questions/2571436/emacs-annoying-flymake-dialog-box
(defun flymake-display-warning (warning)
"Display a warning to the user in the mini-buffer instead of a dialog box"
(message warning))
;; from http://www.emacswiki.org/emacs/FlyMake
(defun safer-flymake-find-file-hook ()
"Don't barf if we can't open this flymake file"
(let ((flymake-filename
(flymake-create-temp-inplace (buffer-file-name) "flymake")))
(if (file-writable-p flymake-filename)
(flymake-find-file-hook)
(message
(format
"Couldn't enable flymake; permission denied on %s" flymake-filename)))))
(add-hook 'find-file-hook 'safer-flymake-find-file-hook)
;; from http://stackoverflow.com/questions/6110691/is-there-a-way-to-make-flymake-to-compile-only-when-i-save
(eval-after-load "flymake"
'(progn
(defun flymake-after-change-function (start stop len)
"Start syntax check for current buffer if it isn't already running."
;; Do nothing, don't want to run checks until I save.
)))