From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Flymake support for C/C++ Date: Sun, 03 Jun 2018 17:28:20 +0100 Message-ID: <87y3fvrg0r.fsf@gmail.com> References: <87zi8wmmhw.fsf@gmail.com> <20171012175044.GA6106@ACM> <87tvz4mcg3.fsf@gmail.com> <20171012203953.GB6106@ACM> <87infkm53o.fsf@gmail.com> <20180601210708.GA6771@ACM> <87in72p3yq.fsf@gmail.com> <20180602103317.GA4392@ACM> <87h8mlt5so.fsf@gmail.com> <20180603154544.GB5860@ACM> 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 1528043223 6695 195.159.176.226 (3 Jun 2018 16:27:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Jun 2018 16:27:03 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: eliz@gnu.org, npostavs@users.sourceforge.net, sdl.web@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 03 18:26:58 2018 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 1fPVqJ-0001XV-PL for ged-emacs-devel@m.gmane.org; Sun, 03 Jun 2018 18:26:55 +0200 Original-Received: from localhost ([::1]:35887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPVsP-0005Sl-8T for ged-emacs-devel@m.gmane.org; Sun, 03 Jun 2018 12:29:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPVrq-0005SV-EN for emacs-devel@gnu.org; Sun, 03 Jun 2018 12:28:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPVrp-0003La-J7 for emacs-devel@gnu.org; Sun, 03 Jun 2018 12:28:30 -0400 Original-Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:36291) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPVrl-0003Fl-N6; Sun, 03 Jun 2018 12:28:25 -0400 Original-Received: by mail-wm0-x230.google.com with SMTP id v131-v6so10313709wma.1; Sun, 03 Jun 2018 09:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=znUdyC8+BLs0s2gP30JuLgO2J2wAkca3o5vWkpQ8p1E=; b=pa5WRitNVe6jrGPvLFD7lQOE3Qyumke8qGK3AfXTtju3PDbeRKvfqSsq20pLs5hniL nCE7jtWunb/mgrhdCTLUMq1ZfxVvxEBtaeqgboeL8aB85VrUq0OXWgWJQNNLjrO4Dc1x iauALyy0Z2d9iiGgRW56/e1nlt8rwpOVlCtpnxn6PfyR19mmdlQql+JOewymhpvHU4Xq 5cJM4tEkTfl8K20aH9gw/A4AoandMs4TFUYRf+/J5XvNb5GuNzIh1KBoZUtoCDF1qJjI Og/mDZwIgWNyRRHdrbZXuORUkbCtvBo6W38XJFHcN678fJcqTfrHxr71x9af3WRvSAbO ZkKQ== 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=znUdyC8+BLs0s2gP30JuLgO2J2wAkca3o5vWkpQ8p1E=; b=jCxDO9oXdzECQIuFz4oSBq53RxFQv5R1befPokl95bMKsKwFRKGRCdtlvXjQ2UsNeP dOBwOCiIpSchWdroZqdBzj06nTYgOFUwMpUQpe6pe/G3Mqc8dxUi8qwB1FaKaGBHXr5z lKvg3zDwf2+oUJ1FoGjQFIU8+ZQJrlaRyTVfCM16HPSQoNeeepvEwVEj/lEUtmh7xxwV RPGRqYeVaHGwQ/0LfLJcvtrHLYlpcfPlrkiy7I9vnsB/yKZlBdlAq4GqqWO2FQvhfrlm VvaiJCpXtxm+7W2GrlWVmPG4gb6T4K6NWcMDaNOEyRtbMbbOHqGrOiBDjG4qrh/v//F4 +qdg== X-Gm-Message-State: APt69E2pmYgFo3Zscu/ma1ZMmipxfkI8UQR06FGRfdkVN5j1ajh86Yb5 qJ5DtbAF3uybPm0hRNOTFMA= X-Google-Smtp-Source: ADUXVKIr2m+mmV5Z6qN7Q0O4lScELqZPnyQSBRgwvQ9LftJCRZ75yWHte3nIk6F7Os/a4BX/kuDZ4A== X-Received: by 2002:a1c:24c4:: with SMTP id k187-v6mr6960800wmk.116.1528043304414; Sun, 03 Jun 2018 09:28:24 -0700 (PDT) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id z5-v6sm6138929wrh.10.2018.06.03.09.28.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Jun 2018 09:28:23 -0700 (PDT) In-Reply-To: <20180603154544.GB5860@ACM> (Alan Mackenzie's message of "Sun, 3 Jun 2018 15:45:44 +0000") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::230 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:225965 Archived-At: Hello Alan, Alan Mackenzie writes: > OK. But a little way down there's a > (setq-local flymake-proc-allowed-file-name-masks nil) > , which will create a buffer-local free variable if the variable doesn't > already exist. This is somewhat untidy. Not so important, either. Very much so. I will remove this line, it's not needed. > How about putting all these details in an alist in flymake-mode.el, > the key being the major-mode That's something that flymake-mode.el had *before* the Emacs 26.1 redesign. It's a natural approach when a package lives outside Emacs, but obviously, suffers from the big drawback that flymake-mode.el itself must be changed everytime a major-mode is added to Emacs, or to GNU ELPA, or anywhere in the emacs ecosphere. >> (add-hook 'flymake-diagnostic-functions 'flymake-cc nil t) > > As I suggested above, why not simply build that information into > flymake.el at build (or customisation) time without troubling CC Mode at > all? No, for the reasons detailed above. As it stands, I propose to add that single to cc-mode.el. As argued already: 1. it is much shorter than, say cc-mode's configuration of imenu, or font-lock 2. in contrast to those two, because it uses add-hook, it will never break or error even if flymake-mode.el is removed, reworked, etc.. > c-initialization-hook is run exactly once, when CC Mode itself is > loaded. Maybe this could be useful here. Unfortunately, it doesn't meet criteria (b), so I can't use it. Jo=C3=A3o