From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Flymake support for C/C++ Date: Thu, 12 Oct 2017 11:50:28 -0400 Message-ID: <87tvz4z7p7.fsf@udel.edu> References: <87zi8wmmhw.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1507823465 12048 195.159.176.226 (12 Oct 2017 15:51:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Oct 2017 15:51:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: npostavs@users.sourceforge.net, emacs-devel@gnu.org, monnier@iro.umontreal.ca, acm@muc.de, eliz@gnu.org, sdl.web@gmail.com To: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 12 17:51:00 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2fky-0000jq-UJ for ged-emacs-devel@m.gmane.org; Thu, 12 Oct 2017 17:50:45 +0200 Original-Received: from localhost ([::1]:46172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2fl6-0002tN-5x for ged-emacs-devel@m.gmane.org; Thu, 12 Oct 2017 11:50:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2fks-0002rT-NR for emacs-devel@gnu.org; Thu, 12 Oct 2017 11:50:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2fko-00011u-BT for emacs-devel@gnu.org; Thu, 12 Oct 2017 11:50:38 -0400 Original-Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:49419) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2fko-0000zP-7E for emacs-devel@gnu.org; Thu, 12 Oct 2017 11:50:34 -0400 Original-Received: by mail-qk0-x242.google.com with SMTP id s14so1740691qks.6 for ; Thu, 12 Oct 2017 08:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=64UDADav8QWBWj5vwhyy8e9/FS4lIi95A8MbPlKylWI=; b=iug93hcEFnnO/kMrziR321vD7u/Z21MExj4axbh9NTB7xj/mmqKGX/sjmu2JUeobXe IY1SkDKB3/4AkeTw5d2bD/S2VEFxDEivfJaghZ1MBIcmGA+DtJLn4x31TGqQhOIb8L9J EvkesWdYLVnQykKLIOf5YheGpzLSraRw4X4rUefe2rAQPmNHJxpGzgwrcJJFpo/m5XhG xhcs7dGkyme1gGoMevdJHAzZw1WH1hCzpXb3MJDq/kCSGbACNWcqnPlnlujRAws0vxZZ /m5n3xv4Crmczn7GeZb4bbsdojKdMy8u/MUmwzu0DfTVbyL8HzaoNFgKCM72JguuAHLE myPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=64UDADav8QWBWj5vwhyy8e9/FS4lIi95A8MbPlKylWI=; b=asaUx0Gxd1TrWbMnnMyA80aaiKT5phBKDDQb/xSMuahPAHQcpY64vcTiMNp1h/j7sv 4NH8sUBC438yXkRNU/PCCFkEQjTo7T8dAvJWKbaw4Q5WjVZ0rprgKRCHMY6OFFY2kF1B 5pr7n6537Q1QdxBz9b929Dggk1keKEsCn3mHE1fTUnKHc/8ZmcKQ7vjVjovvqzvItuAX djbvVSW+fZrc7980a0kuz697L6doGyaKHufisFD7tT4Ux/teiwV+0NP36xNeq4vx42t/ OJtaLO/FOeDb8HxLQ8zBmbxSInbeip6Hc4hg3xCIGov2sQ3cK+483gM7UFCrLkTGKGJa rLMg== X-Gm-Message-State: AMCzsaWQLPh3oqQ4/yyoo0SOMMgx+4x/C0t9eGUjaI0RaEp+m8lfhdFb Pg4s0+CO7d0B8EowY+p38HpuqQ== X-Google-Smtp-Source: ABhQp+Rol+0ti440SZm0zrQmBGpX7W2D4uHRq1vjtsqkCKTo73Ar9tOFrh6+01n1mRlnaEMIN8eeDQ== X-Received: by 10.55.4.135 with SMTP id 129mr1148741qke.137.1507823432074; Thu, 12 Oct 2017 08:50:32 -0700 (PDT) Original-Received: from logos (pool-173-67-36-61.bltmmd.fios.verizon.net. [173.67.36.61]) by smtp.gmail.com with ESMTPSA id s44sm9823266qtc.92.2017.10.12.08.50.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Oct 2017 08:50:30 -0700 (PDT) In-Reply-To: <87zi8wmmhw.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Thu, 12 Oct 2017 16:09:15 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::242 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219419 Archived-At: joaotavora@gmail.com (Jo=C3=A3o T=C3=A1vora) writes: > +;; Flymake support for C/C++. > + > +;;; Code: > + > +(require 'subr-x) ; when-let* Should only need it at compile time, then. > +(defun cc-flymake-use-cc-directly () > + "Build command for checking a file with a C(++) compiler." > + (unless (executable-find cc-flymake-program) > + (error "%s not found" cc-flymake-program)) > + `(,cc-flymake-program > + "-fsyntax-only" > + ,@(cc-flymake--guess-flags cc-flymake-program) > + "-x" "c" "-")) If we're handling multiple languages, a case for the major mode seems appropriate: ... "-x" (pcase major-mode (`c-mode "c") ...) "-")