* 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.
* Makefile (DOCS): New variable listing docs that can be
regenerated with this Makefile.
(maintainer-clean): New target that deletes checked in files that
can be regenerated with this Makefile, as per
(info "(standards) Standard Targets").
(force-docs, force-all): New targets like docs and all,
respectively, that first run maintainer-clean.
Re: #367.
* 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.
Code in the wild relies on mapcar for working with non-list
sequences, and mapcar can still be faster in some degenerate cases.
* dash.el (--map): Use mapcar again.
Fixes#365.
* dev/examples-to-docs.el (example-to-string): Simplify.
* dev/examples-to-info.el (example-to-string): Use @error{} instead
of @result{} for errors. Use error-message-string to translate
error lists to their corresponding message.
* dev/examples-to-tests.el (example-to-should): Add support for
checking whole error lists, not just error symbols.
* dev/examples.el (-running-sum, -running-product, -iota): Specify
whole error list, not just error symbol.
* dash.texi: Regenerate.
There is no need to call eval on Emacs 26+, but tests fail in
earlier versions without it, so bring it back, but this time with
lexical-binding, at least.
* dev/examples-to-tests.el (example-to-should): Bring back eval.
* dash.el (---partition-all-in-steps-reversed): Rename from this...
(dash--partition-all-in-steps-reversed): ...to this. All callers
changed. Signal wrong-type-argument message conforming to
(info "(elisp) Signaling Errors"). Prefer built-in definitions over
Dash ones where either will do.
(-setq): Signal wrong-number-of-arguments like setq.
(-running-sum, -running-product): Signal wrong-type-argument.
* dev/examples.el (-running-sum, -running-product)
(-partition-in-steps, -partition-all-in-steps, -setq): Update
accordingly.
* README.md:
* dash.texi: Regenerate docs.