]> code.delx.au - gnu-emacs/commit
Improve error signalling for seq-subseq.
authorPhillip Lord <phillip.lord@newcastle.ac.uk>
Fri, 7 Aug 2015 21:12:59 +0000 (22:12 +0100)
committerPhillip Lord <phillip.lord@newcastle.ac.uk>
Fri, 7 Aug 2015 21:12:59 +0000 (22:12 +0100)
commitfeadec307da148af70cf87013c99771ca4db91e4
tree96e21a4246aadd41126f921fe5562904fd1b9e15
parent0aec2aaccd8b745fa7214f3edd453c04a04bfba4
Improve error signalling for seq-subseq.

The existing behaviour for seq-subseq is to error when indexes are too
large, but to silently ignore numbers which are too negative for lists.
String and vector handling errors in both cases. This has been
regularlised.

Error signalling behaviour has been explicitly added to the docstring of
seq-subseq, and also to cl-subseq which largely defers to
seq-subseq (and is therefore also impacted by this change).

Tests have been added for these exceptional cases, as well as one non
exceptional base case.
lisp/emacs-lisp/cl-extra.el
lisp/emacs-lisp/seq.el
test/automated/seq-tests.el