From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp? Date: Mon, 4 Sep 2023 13:02:03 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="B1sAyND8dnOFYa6h" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36685"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Richard Stallman , ulm@gentoo.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 04 13:03:53 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qd7N3-0009JY-It for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Sep 2023 13:03:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd7M7-0000T4-WE; Mon, 04 Sep 2023 07:02:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qd7Lz-0000No-RA for emacs-devel@gnu.org; Mon, 04 Sep 2023 07:02:50 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qd7LW-0004JH-Su; Mon, 04 Sep 2023 07:02:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Fa7YHI/vnk/JnL9k3sH280F5vf+9Cbv+JNLg3v3+WBA=; b=CptMeRiHwhvurS5SkZshw6QgqC Jev9EsI2R+Ps+DYzoOFXn0IbzSovDkv35Tx9/XmQF3ObohSgi+UpsrgLMgRxt6goRS0GnrTbzBglN gXdhISaEYK3u1C9gn0uq9xGI6Hb/dnmx1APs/hjQUWHH2X9oKD76EzhAyySMeYWAGprtxKk1iWBLm Z6LDxE9akywhK19etobqDidfLpEVLMLjN0F18g5NRrj42vljVDhUQPnRiqVhMTBgED2deVTEmbiXX Lyclfe7GjFlNuoKxIC2V8YzDlSMZLzpAXWEL/a4Opb+bYwRGZzioBYr0+bHsAokjPEtEgwrQU0YXw AktUdXPA==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1qd7LH-0004O8-Gt; Mon, 04 Sep 2023 13:02:03 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310065 Archived-At: --B1sAyND8dnOFYa6h Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 04, 2023 at 10:50:07AM +0000, Alan Mackenzie wrote: > Hello, Richard. >=20 > On Sun, Sep 03, 2023 at 21:34:08 -0400, Richard Stallman wrote: > > [[[ To any NSA and FBI agents reading my email: please consider ]]] > > [[[ whether defending the US Constitution against all enemies, ]]] > > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] [...] > > > > How about making the byte compiler recognize the construct > =20 > > > > (if (< emacs-major-version NUMBER) ...) >=20 > > > > and do this optimization on it? [...] > (static-if (fboundp 'electric-indent-local-mode) ; Emacs 24.4 or later. > (electric-indent-local-mode (if c-electric-flag 1 0))) >=20 > .. (hash-if has been renamed static-if.) It would be more work to > replace it with >=20 > (when (or (> emacs-major-version 24) > (and (=3D emacs-major-version 24) > (>=3D emacs-minor-version 4))) > (electric-indent-local-mode (if c-electric-flag 1 0))) Besides, a feature test is almost always better than a version test, because it actually documents what the tester cares about. Cheers --=20 t --B1sAyND8dnOFYa6h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZPW5IgAKCRAFyCz1etHa Rq0sAJ9SfKEyoOFxO49hFo0AxRhk7jG83ACeLKuqrkXVPxlMcGjX8HeMEHOGeMY= =6SHa -----END PGP SIGNATURE----- --B1sAyND8dnOFYa6h--