Emacs: annoying Flymake dialog box.

Posted by baol on Stack Overflow See other posts from Stack Overflow or by baol
Published on 2010-04-03T14:01:36Z Indexed on 2010/04/03 14:03 UTC
Read the original article Hit count: 434

Filed under:
|
|
|

Hello I have the following lines in my ~/.emacs.d/init.el

(custom-set-variables
  '(flymake-allowed-file-name-masks 
    (quote 
      (
        ("\\.cc\\'" flymake-simple-make-init) 
        ("\\.cpp\\'" flymake-simple-make-init)))))
(add-hook 'find-file-hook 'flymake-find-file-hook)

When I open a cc/cpp file that has a Makefile with the following content in the same folder I get proper on-the-fly compilation and error reporting (Flymake will check the syntax and report errors and warnings during code editing)

.PHONY: check-syntax
check-syntax:
 $(CXX) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)

The problem is that when I open a .cc file that has no corresponding Makefile i get an annoying dialog box that warns me about flymake being disabled for every file opened.

Is there some hook I can use to disable that warning? Can you provide sample elisp code and explanation on how you found the proper hook?

© Stack Overflow or respective owner

Related posts about emacs

Related posts about flymake