Basil L. Contovounesios
1d897cc3ac
Simplify examples-to-docs a bit
...
* dev/examples-to-docs.el (dash-get-package-version): Remove
function.
(create-docs-file): Replace its use with lm-version.
5 years ago
Basil L. Contovounesios
814c4074a2
* dev/.nosearch: Document file's purpose.
5 years ago
Basil L. Contovounesios
770121b633
Update copyright notices with HTTPS links
...
* LICENSE:
* dash-functional.el:
* dash.el:
* dev/examples-to-docs.el:
* dev/examples-to-info.el:
* dev/examples-to-tests.el:
* dev/examples.el:
* dash-template.texi:
* readme-template.md: Use newest GPL copyright notice text with
HTTPS links.
* README.md:
* dash.texi: Regenerate docs.
5 years ago
Basil L. Contovounesios
081e10a731
Improve take/drop definitions
...
* dash.el (--take-while): Use push.
(-take-while, -drop-while, -take-last): Improve docstring.
(--drop-while, -drop, -drop-last): Return a copy.
(-take): Optimize in terms of --take-while.
* dev/examples.el (-take, -take-last, -drop, -drop-last)
(-take-while, -drop-while): Add more tests.
* README.md:
* dash.info:
* dash.texi: Regenerate docs.
5 years ago
Basil L. Contovounesios
e47ecb822f
Improve --each-while
...
* dash.el (--each-while): Optimize and avoid unused lexical variable
byte-compiler warnings.
* dev/examples.el (-each-while): Add more tests.
* README.md:
* dash.info:
* dash.texi: Regenerate docs.
5 years ago
Basil L. Contovounesios
0517ab1ed1
Optimize -cycle a bit
...
* 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.
5 years ago
Matus Goljer
52fd01071a
feat: add -zip-lists
6 years ago
Matus Goljer
800c25d1e8
feat(docs): simplify (function x) to #'x
6 years ago
Basil L. Contovounesios
25030c96d8
Fix test harness in Emacs 27
...
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.
7 years ago
Basil L. Contovounesios
7854ec7141
Fix quote simplification in docs
...
* dev/examples-to-docs.el (simplify-quotes):
* dev/examples-to-info.el (simplify-quotes):
Also replace 'nil with '().
* README.md:
* dash.info:
* dash.texi: Regenerate docs.
7 years ago
Zhu Zihao
a5706bb451
More test to cover cases on different `-compare-fn`
7 years ago
citreu
bbf8016a78
Remove dependecy `cl-lib` in tests.
...
For compatability for Emacs 24.2 and 24.1
7 years ago
citreu
fd5980eace
Ensure `hash?` expander evaluates its arg only once.
7 years ago
Brian Leung
016e0dee03
Generalize `-rotate` for `|n|` greater than `(length list)`.
7 years ago
Ivan Yonchovski
3f7bc26ec6
Provided option to extend destructoring
...
The descructoring could be extended by defining a function named
`dash-expand:&{destructoring-key}` where {destructoring-key} stands for the key
that will be used in the let destructoring, e. g. &hash/&plist in the standart
dash
7 years ago
Ivan Yonchovski
38d44ed77e
Implement --doto
...
Please let me know if you want me regenerate the docs. When I ran
./create-docs.sh it generates a lot of changes not related to this PR.
7 years ago
Basil L. Contovounesios
a6e143682f
Add -common-suffix
...
Update -common-prefix tests along with those of -common-suffix.
8 years ago
Basil L. Contovounesios
6d2decbc50
Prefer number-to-string over int-to-string
8 years ago
Basil L. Contovounesios
8f90dd7e33
Handle empty list in -reductions[-r]
8 years ago
Basil L. Contovounesios
88737493cd
Improve and simplify right-associative reductions
...
* Translate recursion to iteration to avoid exceeding
max-lisp-eval-depth.
* Rewrite functions in terms of anaphoric macros.
* Expand test cases.
8 years ago
Paul Pogonyshev
8af9987aac
Add '-each-r' and '-each-r-while'.
8 years ago
Matus Goljer
148404c114
[ Fix #256 ] Allow `-let` bindings with no explicit value
8 years ago
Matus Goljer
3b08355b94
Use version from dash.el file when generating readme.
8 years ago
Matus Goljer
406f6f3e71
Fix whitespace
8 years ago
Matus Goljer
e52909f098
Add smarter key destructuring
8 years ago
Matus Goljer
8c4e27fa7e
Implement -setq
8 years ago
Phillip Lord
3789b15618
Change Emacs tested and supported versions.
...
Move to EVM for version management, rather than a patchwork of PPAs.
Add testing for all Emacs versions including minor releases 24.1 to
25.3. Add Emacs-26 pretest. Add Emacs master snapshot.
Fix comments in dash.el that describe workaround for missing gv.el in
24.1.1 and 24.2.1. Update run-tests.el to skip byte compilation check
in these versions.
Remove support for tests on Emacs 23 (and by implication full support
for Emacs-23, although this commit introduces no breaking changes by
itself). Remove ert.el from, as it was needed only for Emacs 23.
8 years ago
Basil L. Contovounesios
72b8d39458
Add -common-prefix
...
Re: #260
8 years ago
Stefan Monnier
c287454fa3
* dev/examples.el: Also require dash-functional for -cut and friends
8 years ago
Stefan Monnier
8a145cacf8
Fix compilation issues in elpa.git
...
* dev/examples.el: Require examples-to-tests to make it compilable.
* .gitignore: Add a general .elc rule to also catch dev/*.elc.
8 years ago
Matus Goljer
91d8cb01e6
Move inits and tails under reductions in the examples
9 years ago
Matus Goljer
057468608d
Make tails and inits return all prefixes including the empty one.
...
It is easy for the user to drop the first/last item with cdr or
-butlast, so let's be consistent with how reductions work
9 years ago
Matus Goljer
55d8cc9294
Running sum and product can only be computed from non-empty lists
9 years ago
Matus Goljer
eb1231eca4
Add -reductions[-r][-from]
9 years ago
Matus Goljer
d8bcf567ef
Add -running-sum and -running-product
9 years ago
Matus Goljer
f8c8dc002c
Add -tails and -inits
9 years ago
duianto
057e55ca58
Update examples.el, remove duplicate -third-item
9 years ago
Wilfred Hughes
66e3e94341
Define -second-item through to -fifth-item
...
cl-second is a very useful function that has no dash
equivalent. Define functions for accessing the second, third, fourth
and fifth items of a list.
9 years ago
Matus Goljer
72675567c6
Fix infinite loop in -zip/-interleave when called with no arguments.
...
Fix #241 .
9 years ago
Basil L. Contovounesios
f69a9df16f
Replace -first with -some in -any?
...
Extend examples accordingly.
Fixes #239
9 years ago
Wilfred Hughes
5d7077a7b4
Set text-quoting-style
...
This enables us to generate docs on newer (25+) Emacsen.
Fixes #192 .
9 years ago
Wilfred Hughes
0297166f41
Docs: Clarify that we don't modify the original list
...
Fixes #231
9 years ago
Zachary Kanfer
13f9eceb60
add tests for nesting anaphoric macros.
9 years ago
Zachary Kanfer
13a4718b3d
Add new partition-before, -after methods.
...
The new methods are -partition-before-pred, -partition-after-pred,
-partition-before-item, and -partition-after-item.
9 years ago
Zachary Kanfer
a3b40f8f01
Make --> bind IT for use anywhere in FORMS, and add -as->.
9 years ago
holomorph
81ef1efa63
Replace string-to-int with string-to-number ( #216 )
...
string-to-int was declared obsolete in Emacs 22.1, and has been removed
for the eventual 26.1 release.
9 years ago
holomorph
dd30a1fbba
[Feature #196 ] Add -powerset and -permutations ( #203 )
9 years ago
Matus Goljer
07c61f5a7e
[ #200 ] Add tests for generalized variables
9 years ago
Matus Goljer
53e641c127
[ Fix #202 ] -table-flat works on input of dimension 1
9 years ago
Matus Goljer
3075aea1a3
Add -unzip
9 years ago