* 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 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.
* 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-to-info.el (dash--print-lisp-as-texi):
* dev/examples-to-docs.el (dash--print-lisp-as-md): Strip leading
zeros from octal escapes in Emacs 26, for consistency with Emacs
27+.
(example-to-string): Remove redundant print-quoted binding.
* dev/examples-to-docs.el (dash--print-lisp-as-md)
(example-to-string): Unquote printed expected result, as that is
both more correct and consistent with standard Emacs documentation.
* README.md: 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-docs.el (def-example-group): Use text properties
to mark group headings.
(function-to-md, function-summary): Simplify accordingly. Remove
gratuitous newlines.
* README.md: Regenerate.
* dev/examples-to-docs.el (create-docs-file): Move 'nil -> '()
replacement from here...
(dash--print-lisp-as-md): ...to this new function.
(example-to-string): Use it to print Lisp in a buffer rather than
manipulating strings.
(defexamples): Move example-to-string call from here...
(function-to-md): ...to here, where it's needed. Replace s-replace
with more correct code.
(s-replace): Remove; no longer used.
* README.md: Regenerate.
* dev/examples-to-docs.el (dash--replace-all): New function.
(create-docs-file): Don't modify functions for more idempotency.
Simplify with dash--replace-all and relative file names.
(simplify-quotes, goto-and-remove, goto-and-replace-all): Remove; no
longer used.
* dev/examples-to-docs.el (example-to-string):
* dev/examples-to-info.el (dash--print-lisp-as-texi): Turn on
print-quoted for the benefit of Emacs versions before 27.
* dev/examples-to-info.el (create-info-file): Move 'nil -> '()
replacement from here...
(dash--print-lisp-as-texi): ...to here.
(example-to-string): Disable case folding to be on the safe side.
(dash--replace-all): Remove regexp argument; no longer used.
* dev/examples-to-info.el (defexamples): Move example-to-string
transformation from here...
(function-to-info): ...to here, where it's needed.
(def-example-group): Use text properties to distinguish groups.
All users changed.
(simplify-quotes, goto-and-remove): Remove, replacing with...
(dash--replace-all): ...this simpler function.
(create-info-file): Don't modify 'functions' destructively for more
idempotency. Use simple relative file names. Simplify with
dash--replace-all.
(function-to-node): Remove; no longer used.
* 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 (dash--print-lisp-as-texi): New function.
(example-to-string, format-docstring): Use it instead of repeatedly
manipulating strings to simplify and generalise Texinfo generation
and avoid a match data bug in replace-regexp-in-string in Emacs
versions before 28 (#368).
(quote-and-downcase, unquote-and-link, format-link): Remove; no
longer used.
Fixes#368.
* 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.
* dev/examples-to-docs.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.
* README.md: Regenerate.
* 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.