From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp? Date: Wed, 6 Sep 2023 09:31:31 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11379"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Richard Stallman , ulm@gentoo.org, emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 06 11:32:40 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 1qdotr-0002jc-NU for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Sep 2023 11:32:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdot7-0008Ju-9O; Wed, 06 Sep 2023 05:31:53 -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 1qdot1-0008Iz-Rx for emacs-devel@gnu.org; Wed, 06 Sep 2023 05:31:48 -0400 Original-Received: from mail.muc.de ([193.149.48.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdosu-0000X0-MP for emacs-devel@gnu.org; Wed, 06 Sep 2023 05:31:43 -0400 Original-Received: (qmail 33291 invoked by uid 3782); 6 Sep 2023 11:31:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=muc.de; i=@muc.de; q=dns/txt; s=default; t=1693992693; h=date : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : from : from; bh=bH1soo+14dBVe7OhE66NnM4NLSMXFaIjRY8tlsX/iN8=; b=JCJKhEVoK3WRZ6Q9nAJtXDW36urdK/L/CUYpxydRVp67SGpPbwsZXsksp0e2bElE7cEIl cA+NRnDipQA5TaIq8in7h7AgO74Ml1VV5uVFL59G5qkDg9SUHgujvPo3WEnc2uvYaOO41bm 8Is3jnpIGGqCbuFd84ENEELOWkbR17oayssKZ9kkmaV2h6XBA12c8Macqtqye9tgSK3iaqp PlleSyUS7lOhNNVJwQmD9rBLzqWOErRv/x+f1rJq8nukjuKPEmTAbzqCkivbQxo+zVmoYy9 cQVDLE9Aw5Ut9LTGVMo0H3HmVn3vWciuhD0L5IjAX9q+YRR95qRaje7jGbvQ== Original-Received: from acm.muc.de (p4fe1538c.dip0.t-ipconnect.de [79.225.83.140]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 06 Sep 2023 11:31:32 +0200 Original-Received: (qmail 4526 invoked by uid 1000); 6 Sep 2023 09:31:31 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@muc.de; helo=mail.muc.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_PASS=-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:310177 Archived-At: Hello, Andreas. On Wed, Sep 06, 2023 at 09:28:35 +0200, Andreas Schwab wrote: > On Sep 05 2023, Richard Stallman wrote: > > > .. (hash-if has been renamed static-if.) It would be more work to > > > replace it with > > > (when (or (> emacs-major-version 24) > > > (and (= emacs-major-version 24) > > > (>= emacs-minor-version 4))) > > > (electric-indent-local-mode (if c-electric-flag 1 0))) > > If you want to have a conditional about version mumbers, > > I think that is the right way to write it. > We also have (version<= "24.4" emacs-version). Thanks! I didn't know about that. > -- > Andreas Schwab, SUSE Labs, schwab@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different." -- Alan Mackenzie (Nuremberg, Germany).