From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: How to fix Emacs24 compiler warning w/o breaking code for previous versions Date: Sun, 19 Jun 2011 14:14:32 -0700 Message-ID: <4DFE66B8.7030402@gmail.com> References: <87oc1xd62s.fsf@gmail.com> <811uytyvgc.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6307CB861FCDCFC85C03E665" X-Trace: dough.gmane.org 1308521847 22701 80.91.229.12 (19 Jun 2011 22:17:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 19 Jun 2011 22:17:27 +0000 (UTC) To: Stefan Monnier , Eric Schulte , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 20 00:17:19 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 1QYQIw-0003En-3W for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2011 00:17:18 +0200 Original-Received: from localhost ([::1]:58127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYQIu-0005AT-BQ for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2011 18:17:16 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYPKO-00059O-Pc for emacs-devel@gnu.org; Sun, 19 Jun 2011 17:14:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYPKH-0000yi-Sx for emacs-devel@gnu.org; Sun, 19 Jun 2011 17:14:39 -0400 Original-Received: from mail-pz0-f41.google.com ([209.85.210.41]:47044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYPKH-0000ye-HL for emacs-devel@gnu.org; Sun, 19 Jun 2011 17:14:37 -0400 Original-Received: by pzk4 with SMTP id 4so3773848pzk.0 for ; Sun, 19 Jun 2011 14:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type; bh=eoPDXZIQCrDaDMXhh0CjPEaIXUFRXetbty3xA3UsGDw=; b=epWOU6eRVZ3hXFx1BAabf5l8AMzVJkTqy9nACD2nR+pxSvKdIsLwdDTRRsIvoypbI6 zmvyZ9MdXJ/Ibz1ywa1Nwja6207kq1F/Pnl4gcTd61fTqyeRpy9IYZZ4TwAXs7XtwiYA LuCkrdEICssF9UzMmkrTRmUpsaEDqD/tWHGH0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=gak5on28Lt6dtX3Qc/rsENuiD2oJ2h6RMGau+mlgbtGrzLqBCK+RVK4d1ntzo9YzNv TTn+TzyrBvoKyOPR84w6ODewfimskghyM9duVDbrY47A6f6L0hvNXRziWIZJzefPatNF fviEPmGO8tVMh4lKxQ+l2S8rHfFR7Riyfq+bc= Original-Received: by 10.68.5.168 with SMTP id t8mr1843586pbt.342.1308518076401; Sun, 19 Jun 2011 14:14:36 -0700 (PDT) Original-Received: from edith.local (c-24-18-179-193.hsd1.wa.comcast.net [24.18.179.193]) by mx.google.com with ESMTPS id g2sm1253380pbh.15.2011.06.19.14.14.35 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Jun 2011 14:14:35 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: <811uytyvgc.fsf@gmail.com> X-Enigmail-Version: 1.1.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.41 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:140688 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6307CB861FCDCFC85C03E665 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 6/16/11 8:42 PM, Jambunathan K wrote: > I was hoping that there is an elisp equivalent for C-like >=20 > #if emacs-version > a > do this > #else > do that > #endif >=20 The Common Lisp #+ reader macro provides the facility you want. For examp= le, (progn #+some-feature 42) would read as (progn 42) on systems with some-feature present and (progn) on systems without that feature. CL also allows arbitrary combinations of and, or, and not calls, e.g, #+(or feature1 (not feature2)) #- also exists, and is similar, except that the sense of the test is inverted. Might this feature be worth adding to Emacs? Of course, it would only help code written for Emacs 24 and above. --------------enig6307CB861FCDCFC85C03E665 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEYEARECAAYFAk3+ZroACgkQ17c2LVA10VvyqgCg3uaoQLCO9oZOG4238rD3KLnj omwAoJZSXNcfLxry59TYwnnrjAyww7WX =iAwh -----END PGP SIGNATURE----- --------------enig6307CB861FCDCFC85C03E665--