summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/seq.el
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/emacs-lisp/seq.el: Bump seq version.Nicolas Petton2017-05-041-1/+1
|
* Add seq-set-equal-p to test for set equalityDamien Cassou2017-05-041-0/+6
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-set-equal-p): Add function to compare two lists as if they were sets. * test/lisp/emacs-lisp/seq-tests.el (test-seq-set-equal-p): Add test for seq-set-equal-p.
* Fix obsolete ‘test/automated’ referencesPaul Eggert2017-03-271-1/+1
| | | | | | | | | | | | | | * Makefile.in (mostlyclean, clean, maybeclean_dirs, distclean) (bootstrap-clean, maintainer-clean): Clean ‘test’, not ‘test/automated’. Test for existence of subdirectory only for ‘test’, not for directories that should always exist. * admin/MAINTAINERS, etc/TODO, lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/seq.el, lisp/emacs-lisp/thunk.el: * lisp/man.el (Man-parse-man-k): * lisp/url/url-domsuf.el, make-dist: * test/file-organization.org: Fix obsolete references to test/automated.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.
* | Make seq-into return the sequence when no conversion neededNicolas Petton2016-12-161-6/+22
| | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-into): Do not convert the sequence when no conversion is needed. * test/lisp/emacs-lisp/seq-tests.el (test-seq-into-and-identity): Add a regression test checking for identity.
* | Fix circular list handling in seq-mapnNicolas Petton2016-12-151-1/+4
| | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-mapn): Do not copy list arguments. * test/lisp/emacs-lisp/seq-tests.el (test-seq-mapn-circular-lists): Add a regression test.
* | Docstring improvement for seq-some (bug#25129)Nicolas Petton2016-12-071-1/+2
| | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-some): Make the docstring less confusing regarding the returned value.
* | * lisp/emacs-lisp/seq.el (seq-random-elt): Fix docstring.Nicolas Petton2016-10-251-1/+1
| |
* | Add seq-random-elt to seq.elDamien Cassou2016-10-251-1/+8
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-random-elt): Add function to return a random element from it's sequence parameter. * test/lisp/emacs-lisp/seq-tests.el (test-seq-random-elt-take-all test-seq-random-elt-return-nil): Test the new function * doc/lispref/sequences.texi: Document the new function
* | * lisp/emacs-lisp/seq.el (seq-let): Fix debug spec (Bug#24738)Nicolas Petton2016-10-241-1/+1
| |
* | Merge from origin/emacs-25Paul Eggert2016-09-261-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0ffc9ce Update admin/authors.el 0ad7410 Update Antinews in ELisp manual ea0f750 Fix comments on window height macros 0bbdeed Fix 'url-http-create-request' when cookies are used 0045998 Fix cross reference in frames.texi 1392894 ; * etc/DEBUG: Minor copyedits. 304a5c8 ; * etc/DEBUG: Improve documentation of getting control to GDB. 56bf7d7 Fix regexp-opt documentation (bug #17862) 803ad6f ; Fix documentation of seq-subseq ed4530d * lisp/emacs-lisp/gv.el (gv-ref): Fix example of PLACE in doc... 88ea396 ; Spelling fixes 17197d0 Fix tags-query-replace docstring 80a7f8b Clarify documentation of precision in format specs 88a5052 Improve and clarify documentation of subprocesses 89eb09f * etc/PROBLEMS: Mention gnutls-cli 3.5.3 (Bug#24247). # Conflicts: # etc/PROBLEMS # src/process.c
| * ; Fix documentation of seq-subseqClément Pit--Claudel2016-09-021-1/+1
| |
| * * lisp/emacs-lisp/seq.el: Load cl-lib, not cl-extra.Glenn Morris2016-04-071-1/+1
| | | | | | | | ; The various components of cl-lib are an internal implementation detail.
* | Fix seq-containsNicolas Petton2016-06-181-2/+3
| | | | | | | | | | | | | | Make sure seq-contains return the element of the sequence instead of t. * lisp/emacs-lisp/seq.el (seq-contains): Fix the function. * test/lisp/emacs-lisp/seq-tests.el: Add a regression test.
* | Add seq-do-indexedNicolas Petton2016-06-181-1/+11
| | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-do-indexed): New function. * test/lisp/emacs-lisp/seq-tests.el: Add a unit test for seq-do-indexed.
* | * lisp/emacs-lisp/seq.el (seq-drop): Better list implementationNicolas Petton2016-06-121-5/+2
| |
* | * lisp/emacs-lisp/seq.el: Require cl-lib instead of cl-extraNicolas Petton2016-03-291-1/+1
| |
* | New function seq-sort-by in seq.elNicolas Petton2016-03-291-1/+11
| | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-sort-by): New function. * test/lisp/emacs-lisp/seq-tests.el: New test for seq-sort-by. * doc/lispref/sequences.texi: Add documentation for seq-sort-by.
* | New function seq-map-indexedNicolas Petton2016-02-141-0/+12
|/ | | | | * lisp/emacs-lisp/seq.el (seq-map-indexed): New function. * test/lisp/emacs-lisp/seq-tests.el: Add tests for seq-map-indexed.
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* Rename seq-p and map-p to seqp and mappNicolas Petton2015-11-111-5/+5
| | | | | | | * lisp/emacs-lisp/seq.el (seqp): New name. * lisp/emacs-lisp/map.el (mapp): New name. * doc/lispref/sequences.texi: Update the documentation for seqp. * test/automated/map-tests.el: Update the tests for mapp.
* * lisp/emacs-lisp/seq.el (seq-mapn): New functionArtur Malabarba2015-10-281-1/+16
| | | | * doc/lispref/sequences.texi (Sequence Functions): Document seq-mapn
* * lisp/emacs-lisp/seq.el: Better docstrings.Nicolas Petton2015-10-261-26/+31
|
* * lisp/emacs-lisp/seq.el: Rename all seq argumentss to sequence.Nicolas Petton2015-10-261-153/+153
|
* New function seq-positionNicolas Petton2015-10-201-2/+13
| | | | | | * lisp/emacs-lisp/seq.el (seq-position): New function. * test/automated/seq-tests.el: New tests for seq-position. * doc/lispref/sequences.texi: Add documentation for `seq-position'.
* Fix typos in docstringsNicolas Petton2015-10-141-1/+1
| | | | | | * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/seq.el: Fix typos in the docstrings of the pcase macros.
* Better docstrings in seq.el and map.elNicolas Petton2015-10-141-4/+7
| | | | | * lisp/emacs-lisp/map.el: * lisp/emacs-lisp/seq.el: Improve the docstring for the pcase patterns.
* Better documentation for seq-someNicolas Petton2015-09-281-2/+1
| | | | | | | * doc/lispref/sequences.texi: * lisp/emacs-lisp/seq.el: Update the documentation of seq-some to guarantee that the returned value is the first non-nil value that resulted from applying the predicate.
* Better docstring and parameter name for seq-findNicolas Petton2015-09-211-6/+6
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-find): Improve the docstring and rename the parameter `sentinel' to `default'. * doc/lispref/sequences.texi (Sequence Functions): Update the documentation for `seq-find' accordingly.
* Add seq-findNicolas Petton2015-09-111-0/+13
| | | | | | | | | | | This function is similar to `seq-some' but returns the found element. In the cases where nil can be the found element, a sentinel optional argument can be provided to avoid ambiguities. * lisp/emacs-lisp/seq.el (seq-find): New function. * test/automated/seq-tests.el (test-seq-find): Add tests for `seq-find'. * doc/lispref/sequences.texi (Sequence Functions): Add documentation for seq-find.
* Remove redundant redefinition of seq-drop-while from seq.elOleh Krehel2015-09-091-7/+1
| | | | * lisp/emacs-lisp/seq.el (seq-drop-while): Define only once.
* Improve the semantic of seq-someNicolas Petton2015-09-061-5/+7
| | | | | | | | | | | | Update seq-some to return non-nil if the predicate returns non-nil for any element of the seq, in which case the returned value is the one returned by the predicate. * lisp/emacs-lisp/seq.el (seq-some): Update the function and its docstring. * test/automated/seq-tests.el (test-seq-some): Add a regression test. * doc/lispref/sequences.texi (Sequence Functions): Update the documentation for seq-some.
* Rename seq-some-p to seq-some and seq-contains-p to seq-containsNicolas Petton2015-09-061-13/+13
| | | | | | | | | * lisp/emacs-lisp/seq.el (seq-some, seq-contains): Rename the functions without the "-p" prefix. * test/automated/seq-tests.el (test-seq-some, test-seq-contains): Update the tests accordingly. * doc/lispref/sequences.texi (Sequence Functions): Update the documentation for seq.el.
* Improve seq-concatenate for new sequence typesNicolas Petton2015-08-271-1/+12
| | | | | | | | | | | Use the new `seq-into-sequence' in seqs passed to `seq-concatenate' to ensure that concatenation happens on sequences only. This makes it possible to use `seq-concatenate' for new types of seqs. * lisp/emacs-lisp/seq.el (seq-into-sequence, seq-concatenate): New function used in `seq-concatenate'. * test/automated/seq-tests.el (test-seq-into-sequence): New unit test for seq-into-sequence.
* Spelling fixesPaul Eggert2015-08-251-1/+1
|
* Fix cl-subseq and cl-concatenateNicolas Petton2015-08-241-5/+1
| | | | | | | * lisp/emacs-lisp/cl-extra.el (cl-subseq, cl-concatenate): Do not use seq functions. * lisp/emacs-lisp/seq.el (seq-concatenate): Call cl-concatenate in seq-concatenate.
* Remove the calls to `seq-into` from `seq-concatenate`Nicolas Petton2015-08-231-12/+5
| | | | | | | | | Since most new types of seq would have to be defined as sequences (cons cells or CL structs, mostly), there is no need to convert the seqs to sequences (which can be a fairly expensive operation). * lisp/emacs-lisp/seq.el (seq-concatenate): Do not ensure that seqs are sequences.
* Make seq.el more extensible by using cl-defmethodNicolas Petton2015-08-231-215/+197
| | | | | | | | * lisp/emacs-lisp/seq.el: Define seq.el functions using cl-defmethod to make it easier to extend seq.el with new "seq types". * test/automated/seq-tests.el (test-setf-seq-elt): New test. * lisp/emacs-lisp/cl-extra.el (cl-subseq): Move back the definition of subseq in cl-extra.el, and use it in seq.el.
* Improve error signalling for seq-subseq.Phillip Lord2015-08-071-1/+6
| | | | | | | | | | | | | | 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/seq.el (seq-difference): Fix typo in docstringNicolas Richard2015-07-021-1/+1
|
* Add seq-min and seq-maxNicolas Petton2015-06-301-1/+11
| | | | | | | Bump version number. * lisp/emacs-lisp/seq.el (seq-min, seq-max): New functions. * test/automated/seq-tests.el: Add tests for seq-min and seq-max.
* * lisp/emacs-lisp/seq.el: Fix a byte-compiler warnings related to pcase.Nicolas Petton2015-06-161-4/+4
|
* * lisp/loadup.el ("emacs-lisp/cl-generic"): PreloadStefan Monnier2015-05-131-1/+1
| | | | | | | | | | | * src/lisp.mk (lisp): Add emacs-lisp/cl-generic.elc. * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Avoid defalias for closures which are not immutable. (cl--generic-prefill-dispatchers): New macro. Use it to prefill the dispatchers table with various entries. * lisp/emacs-lisp/ert.el (emacs-lisp-mode-hook): * lisp/emacs-lisp/seq.el (emacs-lisp-mode-hook): Use add-hook.
* Improve the seq pcase pattern and the `seq-let' macroNicolas Petton2015-05-121-32/+23
| | | | | | * lisp/emacs-lisp/seq.el: The pcase pattern now matches only if the object is a sequence, and binds each element of ARGS to the corresponding element of the sequence.
* New version of `seq-let' based on a pcase patternNicolas Petton2015-05-101-23/+81
| | | | | * lisp/emacs-lisp/seq.el (seq-let): Define the macro in terms of a pcase pattern if `pcase-defmacro' is defined (Emacs>=25.1).
* Merge branch 'seq-let'Nicolas Petton2015-05-051-2/+46
|\
| * Add support for &rest in `seq-let'Nicolas Petton2015-05-051-13/+22
| | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq--make-bindings): Add support for `&rest' in the argument list. * test/automated/seq-tests.el: Add a test for parsing and binding `&rest' in `seq-let'.
| * * lisp/emacs-lisp/seq.el (seq--make-bindings): Improve the docstring.Nicolas Petton2015-05-051-1/+1
| |
| * New macro seq-let, providing destructuring support to seq.elNicolas Petton2015-05-011-2/+37
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-let): New macro. `seq-let' is similar to `cl-destructuring-bind' but works on all sequence types supported by `seq.el'. Bump version number to 1.6. * test/automated/seq-tests.el: Add tests for seq-let. * doc/lispref/sequences.texi: Add documentation for seq-let.