From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: How to fix Emacs24 compiler warning w/o breaking code for previous versions Date: Fri, 17 Jun 2011 09:19:07 +0200 Message-ID: References: <87oc1xd62s.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1308295230 21742 80.91.229.12 (17 Jun 2011 07:20:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Jun 2011 07:20:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eric Schulte Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 17 09:20:26 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QXTLs-0005kP-As for ged-emacs-devel@m.gmane.org; Fri, 17 Jun 2011 09:20:24 +0200 Original-Received: from localhost ([::1]:42314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXTLr-0003Cr-7E for ged-emacs-devel@m.gmane.org; Fri, 17 Jun 2011 03:20:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:49565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXTKt-00032J-V9 for emacs-devel@gnu.org; Fri, 17 Jun 2011 03:19:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXTKs-00071W-4h for emacs-devel@gnu.org; Fri, 17 Jun 2011 03:19:23 -0400 Original-Received: from v3-1008.vxen.de ([79.140.41.8]:60801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXTKr-00070Q-NL for emacs-devel@gnu.org; Fri, 17 Jun 2011 03:19:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=ydpzJyD2LAUYQv2cYkVnz1z8kDTy+ij0cN3fPVvAvUg=; b=qM8juJiaBv3PgQfYn9iS9miP/cWfo7snCkCqnRwWXO7wsEXbAAuRUm0rMfOgwYetv9PEHWpMxXYvgUJQlueKyDQP5V0rBGbRnt1D2eBGFk51iLRlurJ2dQMMYTSRtfje; Original-Received: from ibookg4-c2.pc.gwdg.de ([134.76.4.219]) by v3-1008.vxen.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QXTKj-0007AS-5m; Fri, 17 Jun 2011 09:19:13 +0200 In-Reply-To: <87oc1xd62s.fsf@gmail.com> (Eric Schulte's message of "Thu, 16 Jun 2011 10:44:27 -0700") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (darwin) Mail-Followup-To: Eric Schulte , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 79.140.41.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140592 Archived-At: Eric Schulte writes: > I've been working to address the elisp byte-compiler warnings thrown > while compiling the current Org-mode head, and I do not know how to > address cases where the byte-compiler insists on usage of a new feature > not present in older Emacsen without breaking Org-mode support of those > Emacsen. I'm writing to ask for the "best practices" approach? Not that I think that it is a particularly good example (it's pretty messy, actually), but you might want to look at the Gnus-git repo for ideas. The problem with the "ignore warnings on older Emacsen" approach is that pretty soon you will have difficulties spotting those warnings which signal a real problem. This is especially true if you're using a continuous build system like Gnus does. At least for this automatic build, it currently restricts warnings to the classes '(free-vars unresolved callargs redefine suspicious). If a spurious warning from one of that classes pops up, we make the byte-compiler be quite about it (see lisp/lpath.el in the Gnus repo). -David