From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] scratch/flymake-refactor b75f7e2: Hook Flymake onto proper checkdoc and byte-compile interfaces Date: Sun, 01 Oct 2017 17:40:57 -0400 Message-ID: References: <20171001123811.5647.26035@vcs0.savannah.gnu.org> <20171001123812.A22F12068C@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1506894079 9846 195.159.176.226 (1 Oct 2017 21:41:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 1 Oct 2017 21:41:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 01 23:41:16 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 1dylz9-000223-Nh for ged-emacs-devel@m.gmane.org; Sun, 01 Oct 2017 23:41:15 +0200 Original-Received: from localhost ([::1]:49831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dylzF-0006v2-HG for ged-emacs-devel@m.gmane.org; Sun, 01 Oct 2017 17:41:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dylz6-0006ux-FN for emacs-devel@gnu.org; Sun, 01 Oct 2017 17:41:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dylz3-0000m5-GG for emacs-devel@gnu.org; Sun, 01 Oct 2017 17:41:12 -0400 Original-Received: from pmta11.teksavvy.com ([76.10.157.34]:4115) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1dylz3-0000lN-B0 for emacs-devel@gnu.org; Sun, 01 Oct 2017 17:41:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2FDDAASYNFZ/1V13mhbHQEFAQsBg11Eg?= =?us-ascii?q?Q6DVYtejm0BgiQBmA4KE4UiBAIChDJYAQIBAQEBAQIDaCiFGQZWIxALNAcLFBg?= =?us-ascii?q?NimenEIsvAQEBBwImgy2IZYVQhQggBaEyoDGHPZVUgTlYgQ4yIQgyhhiBaiSKB?= =?us-ascii?q?QEBAQ?= X-IPAS-Result: =?us-ascii?q?A2FDDAASYNFZ/1V13mhbHQEFAQsBg11EgQ6DVYtejm0BgiQ?= =?us-ascii?q?BmA4KE4UiBAIChDJYAQIBAQEBAQIDaCiFGQZWIxALNAcLFBgNimenEIsvAQEBB?= =?us-ascii?q?wImgy2IZYVQhQggBaEyoDGHPZVUgTlYgQ4yIQgyhhiBaiSKBQEBAQ?= X-IronPort-AV: E=Sophos;i="5.42,466,1500955200"; d="scan'208";a="5481910" Original-Received: from 104-222-117-85.cpe.teksavvy.com (HELO ceviche.home) ([104.222.117.85]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Oct 2017 17:41:03 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 85A1566268; Sun, 1 Oct 2017 17:40:57 -0400 (EDT) In-Reply-To: <20171001123812.A22F12068C@vcs0.savannah.gnu.org> (=?windows-1252?Q?=22Jo=E3o=09T=E1vora=22's?= message of "Sun, 1 Oct 2017 08:38:12 -0400 (EDT)") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 76.10.157.34 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:218994 Archived-At: > * lisp/emacs-lisp/bytecomp.el > (byte-compile-log-warning-function): New variable. > (byte-compile-log-warning): Use it. > (byte-compile--log-warning-for-byte-compile): New function. Looking at it, I think it'd be more useful to add a `display-warning-function` which applies to all calls to display-warning. > * lisp/emacs-lisp/checkdoc.el > (checkdoc-create-error-function): New variable. > (checkdoc-create-error): Use it. > (checkdoc--create-error-for-checkdoc): New function.xo As for this one, I see that checkdoc-create-error can be either "declarative" (it just builds an object, with no side-effect) or not depending on checkdoc-generate-compile-warnings-flag. This sounds like checkdoc already has some of the design we need (it can construct error objects and then return them), but maybe some more serious refactoring would be needed to make it really work for flymake. No time to look deeper into it now, Stefan