* dash.el (-cycle): Use append for faster list copying that
continues to work with non-list sequences. Fix docstring.
* dev/examples.el (-cycle): Test that returned list is a copy.
* README.md:
* dash.info:
* dash.texi: Regenerate docs.
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.
Remove Travis CI + EVM which are slow and problematic.
* .github/workflows/test.yml: Run CI also for PRs and with the
latest Emacs release and Checkout Action versions.
* .travis.yml:
* run-travis-ci.sh: Remove files.
Re: #328.
The ->, ->>, and --> threading macros have short names, and they align
all arguments vertically, including the first one.
While the -some->, -some->>, and -some--> macros have similar
behaviour, they actually have quite long names, resulting in code that
looks like this:
(-some->> '(1 2 3)
(do-something)
(and-something-else))
Adding a (declare (indent 1)) declaration for those variants
results in this indentation instead:
(-some->> '(1 2 3)
(do-something)
(and-something-else))
This is arguably better since the ‘some’ version of these threading
macros actually treat their first argument a bit special: if the
expression evalutes to nil, the rest won't even run, and this
indentation makes the whole expression look more like a conditional
form.
Fixes#319.
Emacs 27 officially deprecates cl.el, which causes run-tests.sh to
fail even when all tests pass, due to byte-compiler warnings.
* dash.el: Do not unconditionally require cl.el in all Emacs
versions. Remove gv setter for -first-item, which is redundant
since -first-item is an alias of car. Also wrap calls to
gv-define-setter in with-no-warnings to suppress warnings about
gv--defsetter being undefined at runtime in certain Emacs versions.
(-third-item): Do not assume caddr is defined just because cl.el was
loaded within eval-when-compile: caddr is only defined if cl.el is
loaded at runtime, or in Emacs 26 and above.
* dev/examples.el (odd?): New helper function akin to even?.
(-partition-after-pred, -partition-before-pred): Use it instead of
assuming oddp from cl.el is defined.
* run-tests.sh: Byte-compile all Emacs versions. Pass -Q along with
-batch for some older Emacs versions. Consistently use
short (single-hyphen) Emacs options.
* README.md:
* dash.info:
* dash.texi: Regenerate docs.