* NEWS.md (2.19.2): Rename...
(2.20.0): ...to this. Announce changes.
* README.md:
* dash.texi: Regenerate docs.
* dash.el (-compare-fn): Clarify docstring.
(dash--member-fn, dash--hash-test-fn, dash--size+): New convenience
functions.
(dash--short-list-length): New variable.
(-distinct, -union, -intersection, -difference): Check for empty
list early. Prefer dash--member-fn over -contains? for speed.
Exclude duplicates from return value. Use a hash table for long
lists, but avoid its overhead for short lists.
(-contains?): Delegate to member if -compare-fn is either equal or
nil, not just nil. Reimplement in terms of dash--member-fn.
(-same-items?): Support multisets of different length. Use hash
tables for long lists.
* dev/examples.el (-same-items?): Move from "Predicates" to "Set
operations". Extend tests.
(-contains?, -union, -difference, -intersection, -distinct): Extend
tests.
(dash--member-fn, dash--hash-test-fn, dash--size+): New tests.
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 -->.
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.
Provide a command to register the Dash Info index under
emacs-lisp-mode in info-lookup-alist for the benefit of 'C-h S', and
provide an unloader function for unload-feature to undo this.
* dash.el (dash--info-doc-spec, dash--info-elisp-docs)
(dash-register-info-lookup, dash-unload-function): New definitions.
* dash-template.texi (Info symbol lookup):
* readme-template.md (Info symbol lookup): New sections.
* README.md:
* dash.texi: Regenerate docs.
Fixes#326.
* readme-template.md (Using in a package): Don't hard-code package
version of dash-functional.el.
* dev/examples-to-docs.el (create-docs-file): Substitute package
version of dash-functional.el alongside that of dash.el.
* Makefile: New file subsuming create-docs.sh and run-tests.sh.
* create-docs.sh:
* run-tests.sh: Remove files.
* .github/workflows/test.yml:
* dash-template.texi (Contribute):
* readme-template.md (Contribute):
* pre-commit.sh: Refer to new Make targets.
* dev/examples.el: Add support for running byte-compiled tests in
Emacs < 24.3, where setf was still defined in cl-macs.el.
* README.md:
* dash.texi: Regenerate docs.
* readme-template.md: Link to relevant docs where applicable.
Improve some wording and formatting. Do not promise precisely when
the -zip API will break. Describe CA to the FSF under Contribute
rather than Contributors.
* README.md: Regenerate.
This cleans up the fontification code and makes it less intrusive.
In particular, Dash function calls are no longer fontified, as
discussed in #303.
* dash.el (dash): Fix custom group description.
(dash--enable-fontlock): Remove.
(dash--keywords): New variable.
(dash--turn-on-fontify-mode): New function.
(dash-fontify-mode-lighter): New user option.
(dash-fontify-mode, global-dash-fontify-mode): New autoloaded minor
modes replacing dash-enable-fontlock, dash-enable-font-lock, etc.
(dash-enable-fontlock): Update docstring. Make obsolete in favor of
global-dash-fontify-mode, which is now called in the :set function.
(dash-enable-font-lock): Make obsolete alias of
global-dash-fontify-mode.
* dash-template.texi (Syntax highlighting of dash functions):
* readme-template.md (Syntax highlighting of dash functions):
Retitle as "Fontification of special variables" for clarity and
accuracy and describe dash-fontify-mode instead of the now obsolete
dash-enable-font-lock.
* README.md:
* dash.info:
* dash.texi: Regenerate docs.
Fixes#298.
Fixes#303.
Closes#310.
With a symbol, only the file providing the feature triggers the
eval-after-load. With a string, any file named the same way triggers
it. This is problematic for custom configurations named after
packages.