Commit 8cac2bf0 authored by João Távora's avatar João Távora
Browse files

Make bundled Flymake C backend work for C++, too

* lisp/progmodes/flymake-cc.el (flymake-cc-use-special-make-target):
Pass -x flag according to major-mode.
parent 5fdf4fc0
......@@ -78,7 +78,11 @@ SOURCE."
(defun flymake-cc-use-special-make-target ()
"Command for checking a file via a CHK_SOURCES Make target."
(unless (executable-find "make") (error "Make not found"))
'("make" "check-syntax" "CHK_SOURCES=-x c -"))
,(format "CHK_SOURCES=-x %s -c -"
(cond ((derived-mode-p 'c++-mode) "c++")
(t "c")))))
(defvar-local flymake-cc--proc nil "Internal variable for `flymake-gcc'")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment