unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Documentation patch for seq-subseq
@ 2016-09-01 14:47 Clément Pit--Claudel
  2016-09-02  1:02 ` John Wiegley
  2016-09-02 11:01 ` Michael Heerdegen
  0 siblings, 2 replies; 6+ messages in thread
From: Clément Pit--Claudel @ 2016-09-01 14:47 UTC (permalink / raw)
  To: Emacs developers; +Cc: Nicolas Petton


[-- Attachment #1.1.1: Type: text/plain, Size: 194 bytes --]

Hey emacs-devel,

Attached is a patch fixing the documentation of seq-subseq. I guess it should go to emacs-25?

Test case:

    (seq-subseq '(0 1 2 3) 0 3)
    ⇒ (0 1 2)

Clément.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-Fix-documentation-of-seq-subseq.patch --]
[-- Type: text/x-diff; name="0001-Fix-documentation-of-seq-subseq.patch", Size: 835 bytes --]

From 75922f04f9ee8142dd85f6419430a8111c0c735c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Pit--Claudel?= <clement.pitclaudel@live.com>
Date: Thu, 1 Sep 2016 10:46:14 -0400
Subject: [PATCH] ; Fix documentation of seq-subseq

---
 lisp/emacs-lisp/seq.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index e5004f8..9859f28 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -137,7 +137,7 @@ seq-do-indexed
 
 (cl-defgeneric seq-subseq (sequence start &optional end)
   "Return the sequence of elements of SEQUENCE from START to END.
-END is inclusive.
+END is exclusive.
 
 If END is omitted, it defaults to the length of the sequence.  If
 START or END is negative, it counts from the end.  Signal an
-- 
2.7.4


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Documentation patch for seq-subseq
  2016-09-01 14:47 Documentation patch for seq-subseq Clément Pit--Claudel
@ 2016-09-02  1:02 ` John Wiegley
  2016-09-02  8:02   ` Nicolas Petton
  2016-09-02 11:01 ` Michael Heerdegen
  1 sibling, 1 reply; 6+ messages in thread
From: John Wiegley @ 2016-09-02  1:02 UTC (permalink / raw)
  To: Clément Pit--Claudel; +Cc: Nicolas Petton, Emacs developers

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

>>>>> "CP" == Clément Pit--Claudel <clement.pit@gmail.com> writes:

PC> Attached is a patch fixing the documentation of seq-subseq. I guess it
PC> should go to emacs-25?

Yes, please!

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 629 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Documentation patch for seq-subseq
  2016-09-02  1:02 ` John Wiegley
@ 2016-09-02  8:02   ` Nicolas Petton
  2016-09-02 14:11     ` Clément Pit--Claudel
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Petton @ 2016-09-02  8:02 UTC (permalink / raw)
  To: John Wiegley, Clément Pit--Claudel; +Cc: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

<#secure method=pgpmime mode=encrypt>
John Wiegley <jwiegley@gmail.com> writes:

> PC> Attached is a patch fixing the documentation of seq-subseq. I guess it
> PC> should go to emacs-25?
>
> Yes, please!

Please push the fix to ELPA as well, in both seq/seq-24.el and
seq/seq-25.el.

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Documentation patch for seq-subseq
  2016-09-01 14:47 Documentation patch for seq-subseq Clément Pit--Claudel
  2016-09-02  1:02 ` John Wiegley
@ 2016-09-02 11:01 ` Michael Heerdegen
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Heerdegen @ 2016-09-02 11:01 UTC (permalink / raw)
  To: Clément Pit--Claudel; +Cc: Nicolas Petton, Emacs developers

Clément Pit--Claudel <clement.pit@gmail.com> writes:


>  (cl-defgeneric seq-subseq (sequence start &optional end)
>    "Return the sequence of elements of SEQUENCE from START to END.
> -END is inclusive.
> +END is exclusive.

I think it would be nice to tell also that the index counts from 0.  One
might guess that...but documentation is there to avoid the necessity to
guess ;-)

And FWIW, why doesn't the doc of `cl-subseq' (which `seq-subseq' is
based on) tell nothing about this?


Regards,

Michael.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Documentation patch for seq-subseq
  2016-09-02  8:02   ` Nicolas Petton
@ 2016-09-02 14:11     ` Clément Pit--Claudel
  2016-09-02 19:21       ` Nicolas Petton
  0 siblings, 1 reply; 6+ messages in thread
From: Clément Pit--Claudel @ 2016-09-02 14:11 UTC (permalink / raw)
  To: Nicolas Petton, John Wiegley; +Cc: Emacs developers


[-- Attachment #1.1: Type: text/plain, Size: 424 bytes --]

On 2016-09-02 04:02, Nicolas Petton wrote:
> John Wiegley <jwiegley@gmail.com> writes:
> 
>> PC> Attached is a patch fixing the documentation of seq-subseq. I guess it
>> PC> should go to emacs-25?
>>
>> Yes, please!
> 
> Please push the fix to ELPA as well, in both seq/seq-24.el and
> seq/seq-25.el.

Done in emacs-25 and seq-25; seq-24 has a different documentation string (is this on purpose?)

Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Documentation patch for seq-subseq
  2016-09-02 14:11     ` Clément Pit--Claudel
@ 2016-09-02 19:21       ` Nicolas Petton
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Petton @ 2016-09-02 19:21 UTC (permalink / raw)
  To: Clément Pit--Claudel, John Wiegley; +Cc: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

<#secure method=pgpmime mode=encrypt>
Clément Pit--Claudel <clement.pit@gmail.com> writes:

> Done in emacs-25 and seq-25; seq-24 has a different documentation
> string (is this on purpose?)

No, the seq-24.el was based on an older version of seq.el, and updated
to provide the same API as seq.el in Emacs.  This is most likely a
leftover.

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-02 19:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-01 14:47 Documentation patch for seq-subseq Clément Pit--Claudel
2016-09-02  1:02 ` John Wiegley
2016-09-02  8:02   ` Nicolas Petton
2016-09-02 14:11     ` Clément Pit--Claudel
2016-09-02 19:21       ` Nicolas Petton
2016-09-02 11:01 ` Michael Heerdegen

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).