* reverse in Emacs 24.4
@ 2015-02-10 16:16 Nicolas Petton
2015-02-10 17:03 ` Artur Malabarba
2015-02-10 20:53 ` Stefan Monnier
0 siblings, 2 replies; 8+ messages in thread
From: Nicolas Petton @ 2015-02-10 16:16 UTC (permalink / raw)
To: emacs-devel
Hi,
Some functions of seq.el require reverse to work with sequences, not
only lists as it is in Emacs 24.4.
Currently, `seq-reverse' is an alias for `reverse'.
I want to add a backward-compatible version `seq-reverse' for older
versions of Emacs, but I'm not sure how I should check the version of
Emacs. Parsing the string `emacs-version' seems like a bad idea.
Any advice?
Cheers,
Nico
--
Nicolas Petton
http://nicolas-petton.fr
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reverse in Emacs 24.4
2015-02-10 16:16 reverse in Emacs 24.4 Nicolas Petton
@ 2015-02-10 17:03 ` Artur Malabarba
2015-02-10 17:17 ` Nicolas Petton
2015-02-10 20:53 ` Stefan Monnier
1 sibling, 1 reply; 8+ messages in thread
From: Artur Malabarba @ 2015-02-10 17:03 UTC (permalink / raw)
To: Nicolas Petton; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
> versions of Emacs, but I'm not sure how I should check the version of
> Emacs. Parsing the string `emacs-version' seems like a bad idea.
By "parsing", do you mean version<?
[-- Attachment #2: Type: text/html, Size: 245 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reverse in Emacs 24.4
2015-02-10 17:03 ` Artur Malabarba
@ 2015-02-10 17:17 ` Nicolas Petton
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Petton @ 2015-02-10 17:17 UTC (permalink / raw)
To: bruce.connor.am; +Cc: Nicolas Petton, emacs-devel
Artur Malabarba <bruce.connor.am@gmail.com> writes:
>> versions of Emacs, but I'm not sure how I should check the version of
>> Emacs. Parsing the string `emacs-version' seems like a bad idea.
>
> By "parsing", do you mean version<?
No, I didn't know about this functions, thanks!
Nico
--
Nicolas Petton
http://nicolas-petton.fr
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reverse in Emacs 24.4
2015-02-10 16:16 reverse in Emacs 24.4 Nicolas Petton
2015-02-10 17:03 ` Artur Malabarba
@ 2015-02-10 20:53 ` Stefan Monnier
2015-02-11 13:37 ` Nicolas Petton
1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2015-02-10 20:53 UTC (permalink / raw)
To: Nicolas Petton; +Cc: emacs-devel
> I want to add a backward-compatible version `seq-reverse' for older
> versions of Emacs, but I'm not sure how I should check the version of
> Emacs. Parsing the string `emacs-version' seems like a bad idea.
The way I usually "parse" versions looks like:
(defalias 'seq-reverse
(if (ignore-errors (reverse [1 2]))
#'reverse
(lambda ...)))
-- Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reverse in Emacs 24.4
2015-02-10 20:53 ` Stefan Monnier
@ 2015-02-11 13:37 ` Nicolas Petton
2015-02-11 15:37 ` Stefan Monnier
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Petton @ 2015-02-11 13:37 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Nicolas Petton, emacs-devel
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> I want to add a backward-compatible version `seq-reverse' for older
>> versions of Emacs, but I'm not sure how I should check the version of
>> Emacs. Parsing the string `emacs-version' seems like a bad idea.
>
> The way I usually "parse" versions looks like:
>
> (defalias 'seq-reverse
> (if (ignore-errors (reverse [1 2]))
> #'reverse
> (lambda ...)))
I see. So you'd rather test the feature instead of check the version of
Emacs?
Nico
--
Nicolas Petton
http://nicolas-petton.fr
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reverse in Emacs 24.4
2015-02-11 13:37 ` Nicolas Petton
@ 2015-02-11 15:37 ` Stefan Monnier
2015-02-12 1:43 ` Stephen J. Turnbull
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2015-02-11 15:37 UTC (permalink / raw)
To: Nicolas Petton; +Cc: emacs-devel
> I see. So you'd rather test the feature instead of check the version of
> Emacs?
Yes,
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reverse in Emacs 24.4
2015-02-11 15:37 ` Stefan Monnier
@ 2015-02-12 1:43 ` Stephen J. Turnbull
2015-02-12 14:23 ` Stefan Monnier
0 siblings, 1 reply; 8+ messages in thread
From: Stephen J. Turnbull @ 2015-02-12 1:43 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Nicolas Petton, emacs-devel
Stefan Monnier writes:
> > I see. So you'd rather test the feature instead of check the version of
> > Emacs?
>
> Yes,
It's more reliable (it works with branches that may have the patch but
not an updated emacs-version), and Emacs Lisp is implemented by other
projects that don't follow Emacs versioning.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: reverse in Emacs 24.4
2015-02-12 1:43 ` Stephen J. Turnbull
@ 2015-02-12 14:23 ` Stefan Monnier
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2015-02-12 14:23 UTC (permalink / raw)
To: Stephen J. Turnbull; +Cc: Nicolas Petton, emacs-devel
> Emacs Lisp is implemented by other projects that don't follow
> Emacs versioning.
Are you talking about Sam Steingold's "Elisp in Common-Lisp"?
Stefan ;-)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-02-12 14:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10 16:16 reverse in Emacs 24.4 Nicolas Petton
2015-02-10 17:03 ` Artur Malabarba
2015-02-10 17:17 ` Nicolas Petton
2015-02-10 20:53 ` Stefan Monnier
2015-02-11 13:37 ` Nicolas Petton
2015-02-11 15:37 ` Stefan Monnier
2015-02-12 1:43 ` Stephen J. Turnbull
2015-02-12 14:23 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).