From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: New function `emacs-version>=' Date: Fri, 02 May 2003 17:14:07 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305022114.h42LE8PH022578@rum.cs.yale.edu> References: <67B8CED503F3D511BB9F0008C75DAD66054855C9@dewdfx17> <20030502224227.C2FC.LEKTU@terra.es> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1051910596 21225 80.91.224.249 (2 May 2003 21:23:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 2 May 2003 21:23:16 +0000 (UTC) Cc: "Emacs-Devel \(E-mail\)" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 02 23:23:14 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Bhz1-0005Pe-00 for ; Fri, 02 May 2003 23:22:19 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19Bi0k-00088d-00 for ; Fri, 02 May 2003 23:24:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19BhtW-00020L-01 for emacs-devel@quimby.gnus.org; Fri, 02 May 2003 17:16:38 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19BhrZ-00010W-00 for emacs-devel@gnu.org; Fri, 02 May 2003 17:14:37 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19BhrD-0000S3-00 for emacs-devel@gnu.org; Fri, 02 May 2003 17:14:17 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19BhrA-0000JI-00 for emacs-devel@gnu.org; Fri, 02 May 2003 17:14:12 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h42LE8x6022580; Fri, 2 May 2003 17:14:08 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h42LE8PH022578; Fri, 2 May 2003 17:14:08 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Juanma Barranquero X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13632 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13632 > but the right test is: > > - I want to use feature/fix A > - therefore, I test whether A is available. I think Christoph knows that. It's just that sometimes it's difficult to test whether A works or not. For instance, how do you check whether the `display' property is supported by your version of Emacs ? How do you test whether PNG images are supported (without actually displaying such an image) ? ... In most cases, there's a better solution than testing emacs-version, but there are still some where testing emacs-version makes sense and furthermore people do it anyway, so I'd rather provide an `emacs-version>=' rather than see something fail in Emacs-21 because some idiot wrote (or (= 20 emacs-major-version) (>= 29 emacs-minor-version)). And then we can make bytecomp.el emit warning messages about how you shouldn't use that function ;-) Stefan