* 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.
* 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.