emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subr-x on older Emacsen


From: Bozhidar Batsov
Subject: Re: subr-x on older Emacsen
Date: Fri, 18 Jul 2014 15:21:59 +0300

On July 15, 2014 at 4:09:27 PM, Sebastian Wiesner (address@hidden) wrote:
Hello, 

I’d like to use the new subr-x library in my Emacs Lisp projects, and I’m searching for advice on how to handle backwards compatibility. 

As you know, subr-x was only recently introduced in Emacs trunk, and is not available in any Emacs release. Currently, I simply copy those functions that I need into my code, guarding their definition with `(unless (features 'subr-x) …)'. 

This scales poorly across many projects, obviously, so I’d like to know if there is a better approach to handle this problem. Is their a compatibility package for subr-x on GNU ELPA, similar to cl-lib? 

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 function prior to defining it (follows from the previous bullet point)

Of course, this is part of a much bigger issue as things get constantly added to various Emacs libraries and using them and staying backwards compatible is always problematic. I don’t think we need a subr-x backwards compatibility package, we need an Emacs backwards compatibility package. Perhaps it would include stuff from a few past releases and define the things conditionally if not present?



Greetings, 
Sebastian Wiesner 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]