* dash.el (-first): Contrast -first with -first-item, not car, in
docstring.
(-elem-index, --find-index, --find-last-index): Avoid constructing a
list of results just to throw most of them away. Suggested by
Philippe Vaucher (#394).
(--find-indices): Use --keep for speed.
(-elem-indices, -find-indices): Use --find-indices for speed.
(-find-index, -find-last-index): Use anaphoric counterpart for
speed.
* dev/examples.el (-elem-index, -elem-indices, -find-index)
(-find-last-index, -find-indices): Extend tests.
* README.md:
* dash.texi: Regenerate docs.
Fixes#394.
* Makefile (els): Add dev/examples.el so that it's byte-compiled.
(check): Prefer dev/examples.elc over dev/examples.el.
($(docs)): Remove redundant dependency.
(dev/dash-defs.elc, dev/examples.elc): Manually list dependencies.
* dash.el: Add pure and side-effect-free to defun-declarations-alist
as no-ops when needed, to avoid warnings in Emacsen that lack them.
(--reductions): Pacify uninitialized lexvar warnings in recent
Emacsen (issue #377).
(--splice, -splice): Reimplement the function in terms of the macro
for efficiency and to avoid unused lexvar warnings. Expand
docstrings.
(--map-first, --map-last, --splice-list, --update-at, --split-when)
(--annotate, --find-indices, --find-index, --find-last-index)
(--sort, --max-by, --min-by, --fix, --unfold, --tree-mapreduce-from)
(--tree-mapreduce, --tree-map, --tree-reduce-from, --tree-reduce)
(--tree-map-nodes, --tree-seq): Pacify unused lexvar warnings.
(-value-to-list, -tree-mapreduce-from, -tree-mapreduce, -tree-map)
(-tree-reduce-from, -tree-reduce, -tree-map-nodes, -tree-seq):
Simplify slightly.
* dev/dash-defs.el: Load ert for the benefit of generated tests.
(dash--example-to-test): Remove eval needed in old Emacsen; call it
on a case-by-case basis instead.
(defexamples): Ensure ert-deftest bodies are nonempty.
(dash--describe, dash--lisp-to-md): Move defvar declarations to
top-level or else old Emacsen will complain.
* dev/examples.el: Work around https://bugs.gnu.org/14883 by
enabling byte-compile-delete-errors as needed.
(dash-expand:&hash-or-plist): Wrap in eval-when-compile.
(-splice): Extend tests.
(-map-when, -flatten-n, -list, -some-->, -when-let, -let, -let*)
(-lambda, -setq): Pacify or work around byte-compiler warnings or
errors.
* README.md:
* dash.texi: Regenerate docs.
* dash.el (-flatten, dash--match-cons-1, -distinct, -unfold):
Remove `...' quoting around nil and t in docstrings and commentary,
as per (info "(elisp) Documentation Tips").
(-snoc): Make wording of docstring sound a bit more natural.
(-any?, -none?): Upcase metavariables in docstrings.
* dev/dash-defs.el (dash--booleans-to-md): New function.
(dash--docstring-to-md): Use it to mark up nil/t with backquotes.
(dash--docstring-to-texi): Mark up nil/t as @code.
* README.md:
* dash.texi: Regenerate docs.
* dash.el (-map-when, -map-first, -map-last, -only-some?)
(-update-at, -split-with, -separate)
(dash--partition-all-in-steps-reversed, -partition-all-in-steps)
(-partition-in-steps, --zip-with, -union, -intersection, -prodfn):
Refill and reword docstrings to fit in 80 columns.
(-concat): Eta-reduce, defining as an alias of append.
* dev/examples.el (-partition-all-in-steps): Add a jagged test case.
* README.md:
* dash.texi: Regenerate docs.
Fixes#389.
This is a rewrite and extension of PR #72 to address issue #306.
For discussion, especially wrt performance, see PRs #72 and #308.
* dash.el (-on, -flip, -not, -orfn, -andfn): Return a variadic
function. Declare as pure and side-effect-free.
(-rotate-args): New combinator suggested by @vapniks in PR #72.
(-const): Declare as pure and side-effect-free.
* NEWS.md (2.19.0): Announce -rotate-args and variadic combinators.
* dev/examples.el (-partition-after-pred): Fix oddp bug waiting to
happen with negative dividends.
(-cons*): Check that &rest args are safe to mutate.
(-on, -flip, -const, -not, -orfn, -andfn): Extend tests.
(-rotate-args): New test.
* README.md:
* dash.texi: Regenerate docs.
* dash.el (--every, -every): New definitions; to --every-p and
-every-p what --some and -some are to --some-p and -some-p,
respectively.
(--any?): Open-code ---truthy? for clarity.
(--all?): Rewrite in terms of --every. Extend docstring.
(-all?): Extend docstring.
* dev/examples.el (-any?, -all?, -some): Extend tests.
(-every): New tests.
* NEWS.md (2.19.0): Announce -every and --every.
* README.md:
* dash.texi: Regenerate docs.
* dash.el (-partial): Define as alias of apply-partially.
(-applify): Mark as pure and side-effect-free. Simplify for speed.
* dev/examples.el (-partial, -applify): Extend tests.
* README.md:
* dash.texi: Regenerate docs.
This is the last release of dash-functional, which is now obsolete.
All of its definitions are now provided by dash 2.18.0, which should
be used instead. See issue #356.
* dash.el: Bump version to 2.18.0.
* dash-functional.el: Bump version to 1.3.0 and require dash 2.18.0.
* README.md:
* dash.texi: Regenerate docs.
Closes#152.
This prepares for the release of dash 2.18.0 and the final obsolete
version 1.3.0 of dash-functional.
* NEWS.md (2.18): Announce obsoletion of dash-functional.el.
* dash-functional.el: Mention obsoletion in package Commentary, and
emit a warning when byte-compiled or loaded.
(-rpartial, -juxt, -compose, -applify, -on, -flip, -const, -cut)
(-not, -orfn, -andfn, -iteratefn, -counter, -fixfn-max-iterations)
(-fixfn, -prodfn): Move from here...
* dash.el: ...to here.
(-partial): Move definition under "Combinators".
* Makefile (ELS, dash-functional.elc):
* dev/dash-defs.el (dash--make-md, dash--make-texi):
* dev/examples.el:
(Function combinators):
* dash-template.texi:
(Installation, Using in a package):
* readme-template.md (Installation, Using in a package): Remove all
uses and mentions of dash-functional.
* README.md:
* dash.texi: Regenerate docs.
Closes#356.
* readme-template.md (Contents): New section.
(Upcoming breaking change!, Using in a package)
(Fontification of special variables, Info symbol lookup): Demote to
subsections and reorganise a bit.
(Change log):
* dash-template.texi (Change log): Move duplicated contents from
here...
* NEWS.md: ...to this new change log file, as per GNU ELPA's README.
* README.md:
* dash.texi: Regenerate docs.
* dev/examples-to-info.el (dash--print-lisp-as-texi)
(example-to-string): Unquote printed expected result, as that is
both more correct and consistent with standard Emacs documentation.
* dash.texi: Regenerate.
* dev/examples.el (-take, -drop, -drop-last, -take-while)
(-running-sum, -running-product, -common-prefix, -common-suffix)
(-list, -each-indexed, -dotimes): Prefer '() over () in printed
examples, as we can control how the former is printed, whereas the
latter is always printed as nil.
* README.md:
* dash.texi: Regenerate docs.
* dev/examples-to-info.el (format-docstring): Don't increase
indentation of examples within docstrings. Unlike in Markdown, this
has no effect in Texinfo.
* dash.texi: Regenerate.
* dev/examples-to-info.el (format-docstring): Generalize @-quoting
by doing it first. Use \< and \> in place of \b for better word
boundary detection. Mark all replacements as fixed and literal.
* dash.texi: Regenerate.
This is a copy of commit 2aeb4e4f35 of
2021-01-18 "Use actual advertised function signature in README".
* dev/examples-to-info.el (docs--signature): Remove function.
(dash--describe): New function using the same machinery as
describe-function to determine arglists and docstrings.
(defexamples): Use it instead of docs--signature.
* dash.texi: Regenerate.
* dash.el (-is-prefix?): Stop looping when prefix runs out, even if
list starts with nil elements.
(-is-suffix?): Avoid reversing arguments; just use member.
* dev/examples.el (-is-prefix?, -is-suffix?): Extend tests.
* README.md:
* dash.texi: Regenerate docs.
* dash.el (-remove-item): Define as an alias of remove for speed.
* dev/examples.el (-remove-item): Extend tests.
* README.md:
* dash.texi: Regenerate docs.