Closed rexim closed 8 years ago
Isn't there an equivalent of #ifdef
for Emacs Lisp that you can use to
check for Emacs version and redefine <
in case of 24.3 or below?
If Debian stable thinks it's old, I would think the same. So drop that, it does not exists for our purposes.
Modern emacs gaming requires the top hardware and software configurations. I don't think anyone could object that.
@Minoru,
First, Emacs Lisp is a dynamical language =) I can do that with regular if
.
Second, you suggest to write
(if (version<= emacs-version "24.3")
(and (<= terrified-timer
pacmacs--ghost-blinking-threshold-ms)
(<= pacmacs--ghost-blinking-threshold-ms
(+ terrified-timer pacmacs-tick-duration-ms)))
(<= terrified-timer
pacmacs--ghost-blinking-threshold-ms
(+ terrified-timer pacmacs-tick-duration-ms)))
instead of
(<= terrified-timer
pacmacs--ghost-blinking-threshold-ms
(+ terrified-timer pacmacs-tick-duration-ms))
right? :)
Anyway, I think it's time to drop it anyway. Thanks everyone!
@Minoru, hm.. I just thought that maybe you wanted to suggest to create some sort of crossversional variant of <=
...
It's a good idea, but
<=
should have different name. I'm not sure if we can literally replace it in runtime. And not sure if it's even a good idea<=
.<=
is not the only thing that is fucked up in Emacs 24.3. All the comparators are. And some non-comparators too. And for each of them we have to create a crossversional variant.That's why I'm absolutely for dropping 24.3 completely.
Second, you suggest to write…
Yes. Furthermore, I believe one can write a function that, once called
with the name of a strictly binary function (like <
in 24.3) will
bind to this name a lambda that will accept any number of arguments. You
will then write one if block, somewhere in the main file, and all your
functions will magically work properly for any Emacs version.
- I'm not sure if we can literally replace it in runtime. And not sure if it's even a good idea
You can, but it's considered dangerous; see https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Functions.html
My stand on this issue is that you should only drop support for older
versions if they hinder the development so much you have to backport
whole new sets of features, e.g. implement PNG support or something. 20
or so lines it will probably take you to re-implement <
and others the
way you want them to behave is nothing, or so I believe.
But I'm not going to learn Emacs Lisp to do it myself, so you're free to ignore my ramblings.
Even magit doesn' support 24.3: https://github.com/magit/magit/blob/24b6fb7295c544c4cad6f64653f653c1e1c58406/lisp/magit.el#L19
It's almost 3 years old and even Debian stable thinks it's old. And because of Emacs 24.3 we have to keep these ugly things in our code base.
Maybe it's time to drop it?
@ForNeVeR, @Minoru, we already discussed that on the stream a bit. What do you guys think? I'm ok with dropping that ancient peace of crap.