* dash.el (-is-suffix?): Don't assume that first element of suffix
appears only once (PR #384). This fixes a regression in v2.18.0.
Copyright-paperwork-exempt: yes
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.
This reverts commit 92562909a7
"* dash.el (-->): Indent with 1 distinguished arg."
of 2021-01-10.
This reverts commit 911ef09a30
"* dash.el (->, ->>): Indent with 1 distinguished arg."
of 2021-03-08.
The Clojure-inspired threading macros -> and ->> are quite popular
and were indented until recently with no distinguished arguments as
per Clojure conventions. In Elisp practice this is not a problem
since the macros have short names. For the converse argument
against threading macros such as -some-> that have longer names, see
the discussion in #319 and #321.
This commit reverts relatively recent breaking and controversial
indentation changes that tried to make ->, ->>, and --> more
consistent with the rest of Dash, including -some->, -doto,
etc. which are all indented with a distinguished argument despite
being inspired by Clojure. For the relevant discussion, see #375.
* dash.el (->, ->>, -->): Indent without a distinguished argument.
(-as->, -some->, -some->>, -fixfn): Reindent.
* NEWS.md (2.19.0): Announce indentation change to -->.
The first argument becomes a function name. It can't be instrumented
because that would result in an invalid form such as
((edebug-after 0 1 FUNCTION) ...)
* 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.
* dash.el (-flatten-n): Don't maintain a list of intermediate
results. Eta-reduce.
* dev/examples.el (-flatten-n): Check for destructive side effects.
Re: #373.
* dash.el (--iterate): Evaluate FORM N-1, not N, times, fixing a
regression in Dash 2.18.0. Don't evaluate INIT if N is zero, fixing
a bug since the introduction of the macro.
* dev/examples.el (-flatten-n): Add regression test.
(-iterate): Test for superfluous evaluations.
Fixes#373.
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.
* dash-functional.el (-cut): Prepare for this macro's inclusion in
dash.el by replacing any uses of dash.el functions that are not
defined at byte-compile-time with corresponding macros (#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.