From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.devel Subject: Re: subr-x on older Emacsen Date: Fri, 18 Jul 2014 15:21:59 +0300 Message-ID: References: <47A003F9-F2D7-454C-B148-31A6C2D46C1F@lunaryorn.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="53c91167_333ab105_daeb" X-Trace: ger.gmane.org 1405686147 19802 80.91.229.3 (18 Jul 2014 12:22:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jul 2014 12:22:27 +0000 (UTC) To: Sebastian Wiesner , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 18 14:22:20 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X87B5-00047z-Qc for ged-emacs-devel@m.gmane.org; Fri, 18 Jul 2014 14:22:20 +0200 Original-Received: from localhost ([::1]:49552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X87B5-00065G-D1 for ged-emacs-devel@m.gmane.org; Fri, 18 Jul 2014 08:22:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X87Ax-00064K-VC for emacs-devel@gnu.org; Fri, 18 Jul 2014 08:22:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X87Ar-00074B-UF for emacs-devel@gnu.org; Fri, 18 Jul 2014 08:22:11 -0400 Original-Received: from mail-we0-x233.google.com ([2a00:1450:400c:c03::233]:40661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X87Ar-000722-J7 for emacs-devel@gnu.org; Fri, 18 Jul 2014 08:22:05 -0400 Original-Received: by mail-we0-f179.google.com with SMTP id u57so4439966wes.38 for ; Fri, 18 Jul 2014 05:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type; bh=3SfWicQ7LKEUeyTf9r9l/gmsoszdqM1SEHRikdNMdDM=; b=ZWQDi/1aqqd2ywwTyhATdfw9Ubj3OSifXg4WgSF7qT7e+jz5gceO+zvqb0HpJDAEsz MpYyQuAwajl8lbFR0sV8nAP8AqnrJfCQKgIyxHA39XpgaWwbzyOaUlOGTSACnLJVUiva qYmN+u2o6AC02wLl4XFh6rfn0nQvwuOZSjg8xR0NRYfPE4fhnPBKRUs/5rpyP3uZ2fH9 alavZMWYyI03dBMoial6e8Qc+3ylF2znVapfWw3Jhnn6UVJv469zXJathiDGhO+3vvPo 8acjaRfofXhMlMejQHrHb4k76kob58Ck4codo7oyI7SVrzGBuPWu/m+TGysdmJr7SKbg EkCA== X-Received: by 10.180.221.172 with SMTP id qf12mr7400742wic.54.1405686122670; Fri, 18 Jul 2014 05:22:02 -0700 (PDT) Original-Received: from Bozhidars-MacBook-Pro.local ([95.87.231.111]) by mx.google.com with ESMTPSA id pj6sm13864798wjb.21.2014.07.18.05.22.01 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 05:22:01 -0700 (PDT) In-Reply-To: <47A003F9-F2D7-454C-B148-31A6C2D46C1F@lunaryorn.com> X-Mailer: Airmail (237) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::233 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:173053 Archived-At: --53c91167_333ab105_daeb Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On July 15, 2014 at 4:09:27 PM, Sebastian Wiesner (swiesner=40lunaryorn.c= om) wrote: Hello,=C2=A0 I=E2=80=99d like to use the new subr-x library in my Emacs Lisp projects,= and I=E2=80=99m searching for advice on how to handle backwards compatib= ility.=C2=A0 As you know, subr-x was only recently introduced in Emacs trunk, and is n= ot available in any Emacs release. Currently, I simply copy those functio= ns that I need into my code, guarding their definition with =60(unless (f= eatures 'subr-x) =E2=80=A6)'.=C2=A0 This scales poorly across many projects, obviously, so I=E2=80=99d like t= o know if there is a better approach to handle this problem. Is their a c= ompatibility package for subr-x on GNU ELPA, similar to cl-lib=3F=C2=A0 While this could be done, there a few caveats: * subr-x should be considered a built-in package * newer version might have less functions than older one as ideally parts= of subr-x will be promoted to subr * the compatibility package should check for the presence of each functio= n prior to defining it (follows from the previous bullet point) Of course, this is part of a much bigger issue as things get constantly a= dded to various Emacs libraries and using them and staying backwards comp= atible is always problematic. I don=E2=80=99t think we need a subr-x back= wards compatibility package, we need an Emacs backwards compatibility pac= kage. Perhaps it would include stuff from a few past releases and define = the things conditionally if not present=3F Greetings,=C2=A0 Sebastian Wiesner=C2=A0 --53c91167_333ab105_daeb Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline