diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..f569f55 --- /dev/null +++ b/NEWS.md @@ -0,0 +1,208 @@ +# Dash NEWS -- history of user-visible changes + +Copyright (C) 2012-2021 Free Software Foundation, Inc. + +See the end of the file for license conditions. + +## Change log + +### From 2.16 to 2.17 + +- Sped up `-uniq` by using hash-tables when possible (@cireu, #305). +- Fixed `-inits` to be non-destructive (@SwiftLawnGnome, #313). +- Fixed indent rules for `-some->` and family (@wbolster, #321). +- Added `-zip-lists` which always returns a list of proper lists, even for two + input lists (see issue #135). + +### From 2.15 to 2.16 + +- Added `--doto`, anaphoric version of `-doto` (#282). +- Aliased `-cons-pair-p` to `-cons-pair?` (#288). +- Generalized `-rotate` for `|N|` greater than the length of the list (@leungbk, + #290). +- Added a mechanism to extend destructuring with custom matchers (@yyoncho, + #277). + +### From 2.14 to 2.15 + +This release brings new destructuring features, some new control flow +functions and performance optimizations. + +- Added `-setq` with destructuring binding support similar to the `-let` family + (#116). +- Added smarter key destructuring in `-let` and friends where variables are + auto-derived from keys (#111). +- Allowed `-let` bindings without a source value form (#256). +- Added `-each-r` and `-each-r-while` (@doublep, #159). +- Added `-common-suffix` (@basil-conto, #263). +- Improved performance of folds (`-reduce` and friends) (@basil-conto, #264). + +### From 2.13 to 2.14 + +This release retired Emacs 23 support. + +- Added Edebug support for threading macros (@Wilfred). +- Added `-unzip`. +- Added support for `-first-item` and `-last-item` as [place + forms](https://gnu.org/software/emacs/manual/html_node/elisp/Generalized-Variables.html). +- Added `-powerset` and `-permutations` (@holomorph). +- Added `-as->` for threading a named variable (@zck). +- Added `-partition-after-pred`, `-partition-before-pred`, + `-partition-after-item`, and `-partition-before-item` (@zck). +- Fixed a bug in `-any-p` and friends testing for `null` on lists containing + `nil` (#239). +- Fixed infinite loop bug in `-zip` and `-interleave` when called with empty + input. +- Added `-second-item` through `-fifth-item` as alternatives to `nth` + (@Wilfred). +- Added `-tails` and `-inits`. +- Added `-running-sum` and `-running-product`. +- Added the `-reductions[-r][-from]` family of functions (like `-reduce` but + collecting intermediate results). +- Added `-common-prefix` (@basil-conto). + +### From 2.12 to 2.13 + +- `-let` now supports `&alist` destructuring. +- Various performance improvements. +- `-zip` might change in a future release to always return a list of proper + lists. Added `-zip-pair` for users who explicitly want the old behavior. +- Enabled lexical binding in `dash.el` for Emacs versions 24 or newer (#130). +- Added `-select-column` and `-select-columns`. +- Fixed `-map-last` and `--remove-last` to be non-destructive (#158). +- Added `-each-indexed` and `--each-indexed`. +- Added `-take-last` and `-drop-last`. +- Added the `-doto` macro. +- `-cut <>` is now treated as a function, consistent with [SRFI + 26](https://srfi.schemers.org/srfi-26/srfi-26.html) (#185). + +### From 2.11 to 2.12 + +- Added GNU ELPA support (Phillip Lord). +- Added `-some->`, `-some->>`, and `-some-->` macros (Cam Saul). +- `-is-suffix?` is now non-destructive. +- Faster hash table implementation for `-union`. +- Improvements to docstrings and examples. + +### From 2.10 to 2.11 + +- Lots of clean up w.r.t. byte compilation, debug macros, and tests. + +### From 2.9 to 2.10 + +- Added `-let` destructuring to `-if-let` and `-when-let` (Fredrik Bergroth). + +### From 2.8 to 2.9 + +- Added `-let`, `-let*`, and `-lambda` with destructuring. +- Added `-tree-seq` and `-tree-map-nodes`. +- Added `-non-nil`. +- Added `-fix`. +- Added `-fixfn` (`dash-functional` version `1.2`). +- Added `-copy` (Wilfred Hughes). + +### From 2.7 to 2.8 + +- Added `-butlast`. + +### From 2.6 to 2.7 + +- `-zip` now supports more than two lists (Steve Lamb). +- Added `-cycle`, `-pad`, `-annotate`, and `-zip-fill` (Steve Lamb). +- Added `-table`, `-table-flat` (finite Cartesian product). +- Added `-flatten-n`. +- `-slice` now supports a "step" argument. +- Added functional combinators `-iteratefn` and `-prodfn`. +- Added `-replace`, `-splice`, and `-splice-list` which generalize `-replace-at` + and `-insert-at`. +- Added `-compose`, `-iteratefn`, and `-prodfn` (`dash-functional` version + `1.1`). + +### From 2.5 to 2.6 + +- Added `-is-prefix-p`, `-is-suffix-p`, and `-is-infix-p` (Matus Goljer). +- Added `-iterate` and `-unfold` (Matus Goljer). +- Added `-split-on` and `-split-when` (Matus Goljer). +- Added `-find-last-index` (Matus Goljer). +- Added `-list` (Johan Andersson). + +### From 2.4 to 2.5 + +- Added `-same-items?` (Johan Andersson). +- Various bugfixes. + +### From 2.3 to 2.4 + +- Added `-snoc` (Matus Goljer). +- Added `-replace-at`, `-update-at`, `-remove-at`, and `-remove-at-indices` + (Matus Goljer). + +### From 2.2 to 2.3 + +- Added tree operations (Matus Goljer). +- Made Font Lock optional. + +### From 2.1 to 2.2 + +- Added `-compose` (Christina Whyte). + +### From 2.0 to 2.1 + +- Added indexing operations (Matus Goljer). + +### From 1.8 to 2.0 + +- Split out `dash-functional.el` (Matus Goljer). +- Added `-andfn`, `-orfn`, `-not`, `-cut`, `-const`, `-flip`, and `-on` (Matus + Goljer). +- Fixed `-min`, `-max`, `-min-by`, and `-max-by` (Matus Goljer). + +### From 1.7 to 1.8 + +- Added `-first-item` and `-last-item` (Wilfred Hughes). + +### From 1.6 to 1.7 + +- Added `-rotate` (Matus Goljer). + +### From 1.5 to 1.6 + +- Added `-min`, `-max`, `-min-by`, and `-max-by` (Johan Andersson). + +### From 1.4 to 1.5 + +- Added `-sum` and `-product` (Johan Andersson). + +### From 1.3 to 1.4 + +- Added `-sort`. +- Added `-reduce-r` (Matus Goljer). +- Added `-reduce-r-from` (Matus Goljer). + +### From 1.2 to 1.3 + +- Added `-partition-in-steps`. +- Added `-partition-all-in-steps`. + +### From 1.1 to 1.2 + +- Added `-last` (Matus Goljer). +- Added `-insert-at` (Emanuel Evans). +- Added `-when-let` and `-if-let` (Emanuel Evans). +- Added `-when-let*` and `-if-let*` (Emanuel Evans). +- Various bugfixes. + +## License + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/README.md b/README.md index f268123..018b123 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,34 @@ A modern list API for Emacs. No [`'cl`](https://gnu.org/software/emacs/manual/html_node/cl/) required. +See the end of the file for license conditions. + +## Contents + +* [Change log](#change-log) + * [Upcoming breaking change!](#upcoming-breaking-change) +* [Installation](#installation) +* [Functions](#functions) +* [Contribute](#contribute) +* [Contributors](#contributors) +* [License](#license) + +## Change log + +See the [`NEWS.md`](NEWS.md) file. + +### Upcoming breaking change! + +- For backward compatibility reasons, `-zip` when called with two + lists returns a list of cons cells, rather than a list of proper + lists. This is a clunky API, and may be changed in a future release + to always return a list of proper lists, as `-zip-lists` currently + does. + + **N.B.:** Do not rely on the current behavior of `-zip` for two + lists. Instead, use `-zip-pair` for a list of cons cells, and + `-zip-lists` for a list of proper lists. + ## Installation It's available on [GNU ELPA](https://elpa.gnu.org/) and @@ -20,7 +48,7 @@ If you want the function combinators, then also: M-x package-install dash-functional -## Using in a package +### Using in a package Add something like this to the [library's headers](https://gnu.org/software/emacs/manual/html_node/elisp/Library-Headers.html): @@ -31,19 +59,7 @@ To get function combinators: ;; Package-Requires: ((dash "2.17.0") (dash-functional "1.2.0")) -## Upcoming breaking change! - -- For backward compatibility reasons, `-zip` when called with two - lists returns a list of cons cells, rather than a list of proper - lists. This is a clunky API, and may be changed in a future release - to always return a list of proper lists, as `-zip-lists` currently - does. - - **N.B.:** Do not rely on the current behavior of `-zip` for two - lists. Instead, use `-zip-pair` for a list of cons cells, and - `-zip-lists` for a list of proper lists. - -## Fontification of special variables +### Fontification of special variables Font lock of special Dash variables (`it`, `acc`, etc.) in Emacs Lisp buffers can optionally be enabled with the autoloaded minor mode @@ -58,7 +74,7 @@ either interactively or from your `user-init-file`: (global-dash-fontify-mode) ``` -## Info symbol lookup +### Info symbol lookup While editing Elisp files, you can use `C-h S` (`info-lookup-symbol`) to look up Elisp symbols in the relevant Info manuals (see [`(emacs) @@ -3019,195 +3035,7 @@ instead, respectively. To ensure that `dash.el` can be distributed with GNU ELPA or Emacs, we require that all contributors assign copyright to the Free Software Foundation. For more on this, see [`(info "(emacs) Copyright -Assignment")`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html). - -## Change log - -### From 2.16 to 2.17 - -- Sped up `-uniq` by using hash-tables when possible (@cireu, #305). -- Fixed `-inits` to be non-destructive (@SwiftLawnGnome, #313). -- Fixed indent rules for `-some->` and family (@wbolster, #321). -- Added `-zip-lists` which always returns a list of proper lists, even for two - input lists (see issue #135). - -### From 2.15 to 2.16 - -- Added `--doto`, anaphoric version of `-doto` (#282). -- Aliased `-cons-pair-p` to `-cons-pair?` (#288). -- Generalized `-rotate` for `|N|` greater than the length of the list (@leungbk, - #290). -- Added a mechanism to extend destructuring with custom matchers (@yyoncho, - #277). - -### From 2.14 to 2.15 - -This release brings new destructuring features, some new control flow -functions and performance optimizations. - -- Added `-setq` with destructuring binding support similar to the `-let` family - (#116). -- Added smarter key destructuring in `-let` and friends where variables are - auto-derived from keys (#111). -- Allowed `-let` bindings without a source value form (#256). -- Added `-each-r` and `-each-r-while` (@doublep, #159). -- Added `-common-suffix` (@basil-conto, #263). -- Improved performance of folds (`-reduce` and friends) (@basil-conto, #264). - -### From 2.13 to 2.14 - -This release retired Emacs 23 support. - -- Added Edebug support for threading macros (@Wilfred). -- Added `-unzip`. -- Added support for `-first-item` and `-last-item` as [place - forms](https://www.gnu.org/software/emacs/manual/html_node/elisp/Generalized-Variables.html). -- Added `-powerset` and `-permutations` (@holomorph). -- Added `-as->` for threading a named variable (@zck). -- Added `-partition-after-pred`, `-partition-before-pred`, - `-partition-after-item`, and `-partition-before-item` (@zck). -- Fixed a bug in `-any-p` and friends testing for `null` on lists containing - `nil` (#239). -- Fixed infinite loop bug in `-zip` and `-interleave` when called with empty - input. -- Added `-second-item` through `-fifth-item` as alternatives to `nth` - (@Wilfred). -- Added `-tails` and `-inits`. -- Added `-running-sum` and `-running-product`. -- Added the `-reductions[-r][-from]` family of functions (like `-reduce` but - collecting intermediate results). -- Added `-common-prefix` (@basil-conto). - -### From 2.12 to 2.13 - -- `-let` now supports `&alist` destructuring. -- Various performance improvements. -- `-zip` might change in a future release to always return a list of proper - lists. Added `-zip-pair` for users who explicitly want the old behavior. -- Enabled lexical binding in `dash.el` for Emacs versions 24 or newer (#130). -- Added `-select-column` and `-select-columns`. -- Fixed `-map-last` and `--remove-last` to be non-destructive (#158). -- Added `-each-indexed` and `--each-indexed`. -- Added `-take-last` and `-drop-last`. -- Added the `-doto` macro. -- `-cut <>` is now treated as a function, consistent with [SRFI - 26](https://srfi.schemers.org/srfi-26/srfi-26.html) (#185). - -### From 2.11 to 2.12 - -- Added GNU ELPA support (Phillip Lord). -- Added `-some->`, `-some->>`, and `-some-->` macros (Cam Saul). -- `-is-suffix?` is now non-destructive. -- Faster hash table implementation for `-union`. -- Improvements to docstrings and examples. - -### From 2.10 to 2.11 - -- Lots of clean up w.r.t. byte compilation, debug macros, and tests. - -### From 2.9 to 2.10 - -- Added `-let` destructuring to `-if-let` and `-when-let` (Fredrik Bergroth). - -### From 2.8 to 2.9 - -- Added `-let`, `-let*`, and `-lambda` with destructuring. -- Added `-tree-seq` and `-tree-map-nodes`. -- Added `-non-nil`. -- Added `-fix`. -- Added `-fixfn` (`dash-functional` version `1.2`). -- Added `-copy` (Wilfred Hughes). - -### From 2.7 to 2.8 - -- Added `-butlast`. - -### From 2.6 to 2.7 - -- `-zip` now supports more than two lists (Steve Lamb). -- Added `-cycle`, `-pad`, `-annotate`, and `-zip-fill` (Steve Lamb). -- Added `-table`, `-table-flat` (finite Cartesian product). -- Added `-flatten-n`. -- `-slice` now supports a "step" argument. -- Added functional combinators `-iteratefn` and `-prodfn`. -- Added `-replace`, `-splice`, and `-splice-list` which generalize `-replace-at` - and `-insert-at`. -- Added `-compose`, `-iteratefn`, and `-prodfn` (`dash-functional` version - `1.1`). - -### From 2.5 to 2.6 - -- Added `-is-prefix-p`, `-is-suffix-p`, and `-is-infix-p` (Matus Goljer). -- Added `-iterate` and `-unfold` (Matus Goljer). -- Added `-split-on` and `-split-when` (Matus Goljer). -- Added `-find-last-index` (Matus Goljer). -- Added `-list` (Johan Andersson). - -### From 2.4 to 2.5 - -- Added `-same-items?` (Johan Andersson). -- Various bugfixes. - -### From 2.3 to 2.4 - -- Added `-snoc` (Matus Goljer). -- Added `-replace-at`, `-update-at`, `-remove-at`, and `-remove-at-indices` - (Matus Goljer). - -### From 2.2 to 2.3 - -- Added tree operations (Matus Goljer). -- Made Font Lock optional. - -### From 2.1 to 2.2 - -- Added `-compose` (Christina Whyte). - -### From 2.0 to 2.1 - -- Added indexing operations (Matus Goljer). - -### From 1.8 to 2.0 - -- Split out `dash-functional.el` (Matus Goljer). -- Added `-andfn`, `-orfn`, `-not`, `-cut`, `-const`, `-flip`, and `-on` (Matus - Goljer). -- Fixed `-min`, `-max`, `-min-by`, and `-max-by` (Matus Goljer). - -### From 1.7 to 1.8 - -- Added `-first-item` and `-last-item` (Wilfred Hughes). - -### From 1.6 to 1.7 - -- Added `-rotate` (Matus Goljer). - -### From 1.5 to 1.6 - -- Added `-min`, `-max`, `-min-by`, and `-max-by` (Johan Andersson). - -### From 1.4 to 1.5 - -- Added `-sum` and `-product` (Johan Andersson). - -### From 1.3 to 1.4 - -- Added `-sort`. -- Added `-reduce-r` (Matus Goljer). -- Added `-reduce-r-from` (Matus Goljer). - -### From 1.2 to 1.3 - -- Added `-partition-in-steps`. -- Added `-partition-all-in-steps`. - -### From 1.1 to 1.2 - -- Added `-last` (Matus Goljer). -- Added `-insert-at` (Emanuel Evans). -- Added `-when-let` and `-if-let` (Emanuel Evans). -- Added `-when-let*` and `-if-let*` (Emanuel Evans). -- Various bugfixes. +Assignment")`](https://gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html). ## Contributors diff --git a/dash-template.texi b/dash-template.texi index ae33650..755fc56 100644 --- a/dash-template.texi +++ b/dash-template.texi @@ -73,7 +73,6 @@ Functions Development * Contribute:: How to contribute. -* Change log:: List of significant changes by version. * Contributors:: List of contributors. @end detailmenu @end menu @@ -217,7 +216,6 @@ The Dash repository is hosted on GitHub at @menu * Contribute:: How to contribute. -* Change log:: List of significant changes by version. * Contributors:: List of contributors. @end menu @@ -247,348 +245,6 @@ require that all contributors assign copyright to the Free Software Foundation. For more on this, @pxref{Copyright Assignment,,, emacs, The GNU Emacs Manual}. -@node Change log -@section Change log - -@table @asis -@item Changes in 2.17: - -@itemize -@item -Sped up @code{-uniq} by using hash-tables when possible (Zhu Zihao). -@item -Fixed @code{-inits} to be non-destructive (Zach Shaftel). -@item -Fixed indent rules for @code{-some->} and family (Wouter Bolsterlee). -@item -Added @code{-zip-lists} which always returns a list of proper lists, -even for two input lists (see issue #135). -@end itemize - -@item Changes in 2.16: - -@itemize -@item -Added @code{--doto}, anaphoric version of @code{-doto}. -@item -Aliased @code{-cons-pair-p} to @code{-cons-pair?}. -@item -Generalized @code{-rotate} for @math{|@var{n}|} greater than the -length of the list (Brian Leung). -@item -Added a mechanism to extend destructuring with custom matchers (Ivan -Yonchovski). -@end itemize - -@item Changes in 2.15: - -This release brought new destructuring features, some new control flow -functions, and performance optimizations. - -@itemize -@item -Added @code{-setq} with destructuring binding support similar to the -@code{-let} family. -@item -Added smarter key destructuring in @code{-let} and friends where -variables are auto-derived from keys. -@item -Allowed @code{-let} bindings without a source value form. -@item -Added @code{-each-r} and @code{-each-r-while} (Paul Pogonyshev). -@item -Added @code{-common-suffix} (Basil L. Contovounesios). -@item -Improved performance of folds (@code{-reduce} and friends) (Basil L. -Contovounesios). -@end itemize - -@item Changes in 2.14: - -This release retired support for Emacs 23. - -@itemize -@item -Added Edebug support for threading macros (Wilfred Hughes). -@item -Added @code{-unzip}. -@item -Added support for @code{-first-item} and @code{-last-item} as place -forms (@pxref{Generalized Variables,,, elisp, The Emacs Lisp Reference -Manual}). -@item -Added @code{-powerset} and @code{-permutations} (Mark Oteiza). -@item -Added @code{-as->} for threading a named variable (Zachary Kanfer). -@item -Added @code{-partition-after-pred}, @code{-partition-before-pred}, -@code{-partition-after-item}, and @code{-partition-before-item} -(Zachary Kanfer). -@item -Fixed a bug in @code{-any-p} and friends testing for @code{null} on -lists containing @code{nil}. -@item -Fixed infinite loop bug in @code{-zip} and @code{-interleave} when -called with empty input. -@item -Added @code{-second-item} through @code{-fifth-item} as alternatives -to @code{nth} (Wilfred Hughes). -@item -Added @code{-tails} and @code{-inits}. -@item -Added @code{-running-sum} and @code{-running-product}. -@item -Added the @code{-reductions[-r][-from]} family of functions (like -@code{-reduce} but collecting intermediate results). -@item -Added @code{-common-prefix} (Basil L. Contovounesios). -@end itemize - -@item Changes in 2.13: - -@itemize -@item -@code{-let} now supports @code{&alist} destructuring. -@item -Various performance improvements. -@item -@code{-zip} might change in a future release to always return a list -of proper lists. Added @code{-zip-pair} for users who explicitly want -the old behavior. -@item -Enabled lexical binding in @file{dash.el} for Emacs versions 24 or -newer. -@item -Added @code{-select-column} and @code{-select-columns}. -@item -Fixed @code{-map-last} and @code{--remove-last} to be non-destructive. -@item -Added @code{-each-indexed} and @code{--each-indexed}. -@item -Added @code{-take-last} and @code{-drop-last}. -@item -Added the @code{-doto} macro. -@item -@code{-cut <>} is now treated as a function, consistent with -@url{https://srfi.schemers.org/srfi-26/srfi-26.html, SRFI 26}. -@end itemize - -@item Changes in 2.12: - -@itemize -@item -Added GNU ELPA support (Phillip Lord). -@item -Added @code{-some->}, @code{-some->>}, and @code{-some-->} macros (Cam -Saul). -@item -@code{-is-suffix?} is now non-destructive. -@item -Faster hash table implementation for @code{-union}. -@item -Improvements to docstrings and examples. -@end itemize - -@item Changes in 2.11: - -@itemize -@item -Lots of clean up w.r.t. byte compilation, debug macros, and tests. -@end itemize - -@item Changes in 2.10: - -@itemize -@item -Added @code{-let} destructuring to @code{-if-let} and @code{-when-let} -(Fredrik Bergroth). -@end itemize - -@item Changes in 2.9: - -@itemize -@item -Added @code{-let}, @code{-let*}, and @code{-lambda} with -destructuring. -@item -Added @code{-tree-seq} and @code{-tree-map-nodes}. -@item -Added @code{-non-nil}. -@item -Added @code{-fix}. -@item -Added @code{-fixfn} (@samp{dash-functional} version 1.2). -@item -Added @code{-copy} (Wilfred Hughes). -@end itemize - -@item Changes in 2.8: - -@itemize -@item -Added @code{-butlast}. -@end itemize - -@item Changes in 2.7: - -@itemize -@item -@code{-zip} now supports more than two lists (Steve Lamb). -@item -Added @code{-cycle}, @code{-pad}, @code{-annotate}, and -@code{-zip-fill} (Steve Lamb). -@item -Added @code{-table}, @code{-table-flat} (finite Cartesian product). -@item -Added @code{-flatten-n}. -@item -@code{-slice} now supports a ``step'' argument. -@item -Added functional combinators @code{-iteratefn} and @code{-prodfn}. -@item -Added @code{-replace}, @code{-splice}, and @code{-splice-list} which -generalize @code{-replace-at} and @code{-insert-at}. -@item -Added @code{-compose}, @code{-iteratefn}, and @code{-prodfn} -(@samp{dash-functional} version 1.1). -@end itemize - -@item Changes in 2.6: - -@itemize -@item -Added @code{-is-prefix-p}, @code{-is-suffix-p}, and @code{-is-infix-p} -(Matus Goljer). -@item -Added @code{-iterate} and @code{-unfold} (Matus Goljer). -@item -Added @code{-split-on} and @code{-split-when} (Matus Goljer). -@item -Added @code{-find-last-index} (Matus Goljer). -@item -Added @code{-list} (Johan Andersson). -@end itemize - -@item Changes in 2.5: - -@itemize -@item -Added @code{-same-items?} (Johan Andersson). -@item -Various bugfixes. -@end itemize - -@item Changes in 2.4: - -@itemize -@item -Added @code{-snoc} (Matus Goljer). -@item -Added @code{-replace-at}, @code{-update-at}, @code{-remove-at}, and -@code{-remove-at-indices} (Matus Goljer). -@end itemize - -@item Changes in 2.3: - -@itemize -@item -Added tree operations (Matus Goljer). -@item -Made Font Lock optional. -@end itemize - -@item Changes in 2.2: - -@itemize -@item -Added @code{-compose} (Christina Whyte). -@end itemize - -@item Changes in 2.1: - -@itemize -@item -Added indexing operations (Matus Goljer). -@end itemize - -@item Changes in 2.0: - -@itemize -@item -Split out @file{dash-functional.el} (Matus Goljer). -@item -Added @code{-andfn}, @code{-orfn}, @code{-not}, @code{-cut}, -@code{-const}, @code{-flip}, and @code{-on} (Matus Goljer). -@item -Fixed @code{-min}, @code{-max}, @code{-min-by}, and @code{-max-by} -(Matus Goljer). -@end itemize - -@item Changes in 1.8: - -@itemize -@item -Added @code{-first-item} and @code{-last-item} (Wilfred Hughes). -@end itemize - -@item Changes in 1.7: - -@itemize -@item -Added @code{-rotate} (Matus Goljer). -@end itemize - -@item Changes in 1.6: - -@itemize -@item -Added @code{-min}, @code{-max}, @code{-min-by}, and @code{-max-by} -(Johan Andersson). -@end itemize - -@item Changes in 1.5: - -@itemize -@item -Added @code{-sum} and @code{-product} (Johan Andersson). -@end itemize - -@item Changes in 1.4: - -@itemize -@item -Added @code{-sort}. -@item -Added @code{-reduce-r} (Matus Goljer). -@item -Added @code{-reduce-r-from} (Matus Goljer). -@end itemize - -@item Changes in 1.3: - -@itemize -@item -Added @code{-partition-in-steps}. -@item -Added @code{-partition-all-in-steps}. -@end itemize - -@item Changes in 1.2: - -@itemize -@item -Added @code{-last} (Matus Goljer). -@item -Added @code{-insert-at} (Emanuel Evans). -@item -Added @code{-when-let} and @code{-if-let} (Emanuel Evans). -@item -Added @code{-when-let*} and @code{-if-let*} (Emanuel Evans). -@item -Various bugfixes. -@end itemize -@end table - @node Contributors @section Contributors diff --git a/dash.texi b/dash.texi index 481cfa2..a45412a 100644 --- a/dash.texi +++ b/dash.texi @@ -88,7 +88,6 @@ Functions Development * Contribute:: How to contribute. -* Change log:: List of significant changes by version. * Contributors:: List of contributors. @end detailmenu @end menu @@ -4571,7 +4570,6 @@ The Dash repository is hosted on GitHub at @menu * Contribute:: How to contribute. -* Change log:: List of significant changes by version. * Contributors:: List of contributors. @end menu @@ -4601,348 +4599,6 @@ require that all contributors assign copyright to the Free Software Foundation. For more on this, @pxref{Copyright Assignment,,, emacs, The GNU Emacs Manual}. -@node Change log -@section Change log - -@table @asis -@item Changes in 2.17: - -@itemize -@item -Sped up @code{-uniq} by using hash-tables when possible (Zhu Zihao). -@item -Fixed @code{-inits} to be non-destructive (Zach Shaftel). -@item -Fixed indent rules for @code{-some->} and family (Wouter Bolsterlee). -@item -Added @code{-zip-lists} which always returns a list of proper lists, -even for two input lists (see issue #135). -@end itemize - -@item Changes in 2.16: - -@itemize -@item -Added @code{--doto}, anaphoric version of @code{-doto}. -@item -Aliased @code{-cons-pair-p} to @code{-cons-pair?}. -@item -Generalized @code{-rotate} for @math{|@var{n}|} greater than the -length of the list (Brian Leung). -@item -Added a mechanism to extend destructuring with custom matchers (Ivan -Yonchovski). -@end itemize - -@item Changes in 2.15: - -This release brought new destructuring features, some new control flow -functions, and performance optimizations. - -@itemize -@item -Added @code{-setq} with destructuring binding support similar to the -@code{-let} family. -@item -Added smarter key destructuring in @code{-let} and friends where -variables are auto-derived from keys. -@item -Allowed @code{-let} bindings without a source value form. -@item -Added @code{-each-r} and @code{-each-r-while} (Paul Pogonyshev). -@item -Added @code{-common-suffix} (Basil L. Contovounesios). -@item -Improved performance of folds (@code{-reduce} and friends) (Basil L. -Contovounesios). -@end itemize - -@item Changes in 2.14: - -This release retired support for Emacs 23. - -@itemize -@item -Added Edebug support for threading macros (Wilfred Hughes). -@item -Added @code{-unzip}. -@item -Added support for @code{-first-item} and @code{-last-item} as place -forms (@pxref{Generalized Variables,,, elisp, The Emacs Lisp Reference -Manual}). -@item -Added @code{-powerset} and @code{-permutations} (Mark Oteiza). -@item -Added @code{-as->} for threading a named variable (Zachary Kanfer). -@item -Added @code{-partition-after-pred}, @code{-partition-before-pred}, -@code{-partition-after-item}, and @code{-partition-before-item} -(Zachary Kanfer). -@item -Fixed a bug in @code{-any-p} and friends testing for @code{null} on -lists containing @code{nil}. -@item -Fixed infinite loop bug in @code{-zip} and @code{-interleave} when -called with empty input. -@item -Added @code{-second-item} through @code{-fifth-item} as alternatives -to @code{nth} (Wilfred Hughes). -@item -Added @code{-tails} and @code{-inits}. -@item -Added @code{-running-sum} and @code{-running-product}. -@item -Added the @code{-reductions[-r][-from]} family of functions (like -@code{-reduce} but collecting intermediate results). -@item -Added @code{-common-prefix} (Basil L. Contovounesios). -@end itemize - -@item Changes in 2.13: - -@itemize -@item -@code{-let} now supports @code{&alist} destructuring. -@item -Various performance improvements. -@item -@code{-zip} might change in a future release to always return a list -of proper lists. Added @code{-zip-pair} for users who explicitly want -the old behavior. -@item -Enabled lexical binding in @file{dash.el} for Emacs versions 24 or -newer. -@item -Added @code{-select-column} and @code{-select-columns}. -@item -Fixed @code{-map-last} and @code{--remove-last} to be non-destructive. -@item -Added @code{-each-indexed} and @code{--each-indexed}. -@item -Added @code{-take-last} and @code{-drop-last}. -@item -Added the @code{-doto} macro. -@item -@code{-cut <>} is now treated as a function, consistent with -@url{https://srfi.schemers.org/srfi-26/srfi-26.html, SRFI 26}. -@end itemize - -@item Changes in 2.12: - -@itemize -@item -Added GNU ELPA support (Phillip Lord). -@item -Added @code{-some->}, @code{-some->>}, and @code{-some-->} macros (Cam -Saul). -@item -@code{-is-suffix?} is now non-destructive. -@item -Faster hash table implementation for @code{-union}. -@item -Improvements to docstrings and examples. -@end itemize - -@item Changes in 2.11: - -@itemize -@item -Lots of clean up w.r.t. byte compilation, debug macros, and tests. -@end itemize - -@item Changes in 2.10: - -@itemize -@item -Added @code{-let} destructuring to @code{-if-let} and @code{-when-let} -(Fredrik Bergroth). -@end itemize - -@item Changes in 2.9: - -@itemize -@item -Added @code{-let}, @code{-let*}, and @code{-lambda} with -destructuring. -@item -Added @code{-tree-seq} and @code{-tree-map-nodes}. -@item -Added @code{-non-nil}. -@item -Added @code{-fix}. -@item -Added @code{-fixfn} (@samp{dash-functional} version 1.2). -@item -Added @code{-copy} (Wilfred Hughes). -@end itemize - -@item Changes in 2.8: - -@itemize -@item -Added @code{-butlast}. -@end itemize - -@item Changes in 2.7: - -@itemize -@item -@code{-zip} now supports more than two lists (Steve Lamb). -@item -Added @code{-cycle}, @code{-pad}, @code{-annotate}, and -@code{-zip-fill} (Steve Lamb). -@item -Added @code{-table}, @code{-table-flat} (finite Cartesian product). -@item -Added @code{-flatten-n}. -@item -@code{-slice} now supports a ``step'' argument. -@item -Added functional combinators @code{-iteratefn} and @code{-prodfn}. -@item -Added @code{-replace}, @code{-splice}, and @code{-splice-list} which -generalize @code{-replace-at} and @code{-insert-at}. -@item -Added @code{-compose}, @code{-iteratefn}, and @code{-prodfn} -(@samp{dash-functional} version 1.1). -@end itemize - -@item Changes in 2.6: - -@itemize -@item -Added @code{-is-prefix-p}, @code{-is-suffix-p}, and @code{-is-infix-p} -(Matus Goljer). -@item -Added @code{-iterate} and @code{-unfold} (Matus Goljer). -@item -Added @code{-split-on} and @code{-split-when} (Matus Goljer). -@item -Added @code{-find-last-index} (Matus Goljer). -@item -Added @code{-list} (Johan Andersson). -@end itemize - -@item Changes in 2.5: - -@itemize -@item -Added @code{-same-items?} (Johan Andersson). -@item -Various bugfixes. -@end itemize - -@item Changes in 2.4: - -@itemize -@item -Added @code{-snoc} (Matus Goljer). -@item -Added @code{-replace-at}, @code{-update-at}, @code{-remove-at}, and -@code{-remove-at-indices} (Matus Goljer). -@end itemize - -@item Changes in 2.3: - -@itemize -@item -Added tree operations (Matus Goljer). -@item -Made Font Lock optional. -@end itemize - -@item Changes in 2.2: - -@itemize -@item -Added @code{-compose} (Christina Whyte). -@end itemize - -@item Changes in 2.1: - -@itemize -@item -Added indexing operations (Matus Goljer). -@end itemize - -@item Changes in 2.0: - -@itemize -@item -Split out @file{dash-functional.el} (Matus Goljer). -@item -Added @code{-andfn}, @code{-orfn}, @code{-not}, @code{-cut}, -@code{-const}, @code{-flip}, and @code{-on} (Matus Goljer). -@item -Fixed @code{-min}, @code{-max}, @code{-min-by}, and @code{-max-by} -(Matus Goljer). -@end itemize - -@item Changes in 1.8: - -@itemize -@item -Added @code{-first-item} and @code{-last-item} (Wilfred Hughes). -@end itemize - -@item Changes in 1.7: - -@itemize -@item -Added @code{-rotate} (Matus Goljer). -@end itemize - -@item Changes in 1.6: - -@itemize -@item -Added @code{-min}, @code{-max}, @code{-min-by}, and @code{-max-by} -(Johan Andersson). -@end itemize - -@item Changes in 1.5: - -@itemize -@item -Added @code{-sum} and @code{-product} (Johan Andersson). -@end itemize - -@item Changes in 1.4: - -@itemize -@item -Added @code{-sort}. -@item -Added @code{-reduce-r} (Matus Goljer). -@item -Added @code{-reduce-r-from} (Matus Goljer). -@end itemize - -@item Changes in 1.3: - -@itemize -@item -Added @code{-partition-in-steps}. -@item -Added @code{-partition-all-in-steps}. -@end itemize - -@item Changes in 1.2: - -@itemize -@item -Added @code{-last} (Matus Goljer). -@item -Added @code{-insert-at} (Emanuel Evans). -@item -Added @code{-when-let} and @code{-if-let} (Emanuel Evans). -@item -Added @code{-when-let*} and @code{-if-let*} (Emanuel Evans). -@item -Various bugfixes. -@end itemize -@end table - @node Contributors @section Contributors diff --git a/readme-template.md b/readme-template.md index ff8a685..25edfa8 100644 --- a/readme-template.md +++ b/readme-template.md @@ -7,6 +7,34 @@ A modern list API for Emacs. No [`'cl`](https://gnu.org/software/emacs/manual/html_node/cl/) required. +See the end of the file for license conditions. + +## Contents + +* [Change log](#change-log) + * [Upcoming breaking change!](#upcoming-breaking-change) +* [Installation](#installation) +* [Functions](#functions) +* [Contribute](#contribute) +* [Contributors](#contributors) +* [License](#license) + +## Change log + +See the [`NEWS.md`](NEWS.md) file. + +### Upcoming breaking change! + +- For backward compatibility reasons, `-zip` when called with two + lists returns a list of cons cells, rather than a list of proper + lists. This is a clunky API, and may be changed in a future release + to always return a list of proper lists, as `-zip-lists` currently + does. + + **N.B.:** Do not rely on the current behavior of `-zip` for two + lists. Instead, use `-zip-pair` for a list of cons cells, and + `-zip-lists` for a list of proper lists. + ## Installation It's available on [GNU ELPA](https://elpa.gnu.org/) and @@ -20,7 +48,7 @@ If you want the function combinators, then also: M-x package-install dash-functional -## Using in a package +### Using in a package Add something like this to the [library's headers](https://gnu.org/software/emacs/manual/html_node/elisp/Library-Headers.html): @@ -31,19 +59,7 @@ To get function combinators: ;; Package-Requires: ((dash "[[ dash-version ]]") (dash-functional "[[ dash-functional-version ]]")) -## Upcoming breaking change! - -- For backward compatibility reasons, `-zip` when called with two - lists returns a list of cons cells, rather than a list of proper - lists. This is a clunky API, and may be changed in a future release - to always return a list of proper lists, as `-zip-lists` currently - does. - - **N.B.:** Do not rely on the current behavior of `-zip` for two - lists. Instead, use `-zip-pair` for a list of cons cells, and - `-zip-lists` for a list of proper lists. - -## Fontification of special variables +### Fontification of special variables Font lock of special Dash variables (`it`, `acc`, etc.) in Emacs Lisp buffers can optionally be enabled with the autoloaded minor mode @@ -58,7 +74,7 @@ either interactively or from your `user-init-file`: (global-dash-fontify-mode) ``` -## Info symbol lookup +### Info symbol lookup While editing Elisp files, you can use `C-h S` (`info-lookup-symbol`) to look up Elisp symbols in the relevant Info manuals (see [`(emacs) @@ -137,195 +153,7 @@ instead, respectively. To ensure that `dash.el` can be distributed with GNU ELPA or Emacs, we require that all contributors assign copyright to the Free Software Foundation. For more on this, see [`(info "(emacs) Copyright -Assignment")`](https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html). - -## Change log - -### From 2.16 to 2.17 - -- Sped up `-uniq` by using hash-tables when possible (@cireu, #305). -- Fixed `-inits` to be non-destructive (@SwiftLawnGnome, #313). -- Fixed indent rules for `-some->` and family (@wbolster, #321). -- Added `-zip-lists` which always returns a list of proper lists, even for two - input lists (see issue #135). - -### From 2.15 to 2.16 - -- Added `--doto`, anaphoric version of `-doto` (#282). -- Aliased `-cons-pair-p` to `-cons-pair?` (#288). -- Generalized `-rotate` for `|N|` greater than the length of the list (@leungbk, - #290). -- Added a mechanism to extend destructuring with custom matchers (@yyoncho, - #277). - -### From 2.14 to 2.15 - -This release brings new destructuring features, some new control flow -functions and performance optimizations. - -- Added `-setq` with destructuring binding support similar to the `-let` family - (#116). -- Added smarter key destructuring in `-let` and friends where variables are - auto-derived from keys (#111). -- Allowed `-let` bindings without a source value form (#256). -- Added `-each-r` and `-each-r-while` (@doublep, #159). -- Added `-common-suffix` (@basil-conto, #263). -- Improved performance of folds (`-reduce` and friends) (@basil-conto, #264). - -### From 2.13 to 2.14 - -This release retired Emacs 23 support. - -- Added Edebug support for threading macros (@Wilfred). -- Added `-unzip`. -- Added support for `-first-item` and `-last-item` as [place - forms](https://www.gnu.org/software/emacs/manual/html_node/elisp/Generalized-Variables.html). -- Added `-powerset` and `-permutations` (@holomorph). -- Added `-as->` for threading a named variable (@zck). -- Added `-partition-after-pred`, `-partition-before-pred`, - `-partition-after-item`, and `-partition-before-item` (@zck). -- Fixed a bug in `-any-p` and friends testing for `null` on lists containing - `nil` (#239). -- Fixed infinite loop bug in `-zip` and `-interleave` when called with empty - input. -- Added `-second-item` through `-fifth-item` as alternatives to `nth` - (@Wilfred). -- Added `-tails` and `-inits`. -- Added `-running-sum` and `-running-product`. -- Added the `-reductions[-r][-from]` family of functions (like `-reduce` but - collecting intermediate results). -- Added `-common-prefix` (@basil-conto). - -### From 2.12 to 2.13 - -- `-let` now supports `&alist` destructuring. -- Various performance improvements. -- `-zip` might change in a future release to always return a list of proper - lists. Added `-zip-pair` for users who explicitly want the old behavior. -- Enabled lexical binding in `dash.el` for Emacs versions 24 or newer (#130). -- Added `-select-column` and `-select-columns`. -- Fixed `-map-last` and `--remove-last` to be non-destructive (#158). -- Added `-each-indexed` and `--each-indexed`. -- Added `-take-last` and `-drop-last`. -- Added the `-doto` macro. -- `-cut <>` is now treated as a function, consistent with [SRFI - 26](https://srfi.schemers.org/srfi-26/srfi-26.html) (#185). - -### From 2.11 to 2.12 - -- Added GNU ELPA support (Phillip Lord). -- Added `-some->`, `-some->>`, and `-some-->` macros (Cam Saul). -- `-is-suffix?` is now non-destructive. -- Faster hash table implementation for `-union`. -- Improvements to docstrings and examples. - -### From 2.10 to 2.11 - -- Lots of clean up w.r.t. byte compilation, debug macros, and tests. - -### From 2.9 to 2.10 - -- Added `-let` destructuring to `-if-let` and `-when-let` (Fredrik Bergroth). - -### From 2.8 to 2.9 - -- Added `-let`, `-let*`, and `-lambda` with destructuring. -- Added `-tree-seq` and `-tree-map-nodes`. -- Added `-non-nil`. -- Added `-fix`. -- Added `-fixfn` (`dash-functional` version `1.2`). -- Added `-copy` (Wilfred Hughes). - -### From 2.7 to 2.8 - -- Added `-butlast`. - -### From 2.6 to 2.7 - -- `-zip` now supports more than two lists (Steve Lamb). -- Added `-cycle`, `-pad`, `-annotate`, and `-zip-fill` (Steve Lamb). -- Added `-table`, `-table-flat` (finite Cartesian product). -- Added `-flatten-n`. -- `-slice` now supports a "step" argument. -- Added functional combinators `-iteratefn` and `-prodfn`. -- Added `-replace`, `-splice`, and `-splice-list` which generalize `-replace-at` - and `-insert-at`. -- Added `-compose`, `-iteratefn`, and `-prodfn` (`dash-functional` version - `1.1`). - -### From 2.5 to 2.6 - -- Added `-is-prefix-p`, `-is-suffix-p`, and `-is-infix-p` (Matus Goljer). -- Added `-iterate` and `-unfold` (Matus Goljer). -- Added `-split-on` and `-split-when` (Matus Goljer). -- Added `-find-last-index` (Matus Goljer). -- Added `-list` (Johan Andersson). - -### From 2.4 to 2.5 - -- Added `-same-items?` (Johan Andersson). -- Various bugfixes. - -### From 2.3 to 2.4 - -- Added `-snoc` (Matus Goljer). -- Added `-replace-at`, `-update-at`, `-remove-at`, and `-remove-at-indices` - (Matus Goljer). - -### From 2.2 to 2.3 - -- Added tree operations (Matus Goljer). -- Made Font Lock optional. - -### From 2.1 to 2.2 - -- Added `-compose` (Christina Whyte). - -### From 2.0 to 2.1 - -- Added indexing operations (Matus Goljer). - -### From 1.8 to 2.0 - -- Split out `dash-functional.el` (Matus Goljer). -- Added `-andfn`, `-orfn`, `-not`, `-cut`, `-const`, `-flip`, and `-on` (Matus - Goljer). -- Fixed `-min`, `-max`, `-min-by`, and `-max-by` (Matus Goljer). - -### From 1.7 to 1.8 - -- Added `-first-item` and `-last-item` (Wilfred Hughes). - -### From 1.6 to 1.7 - -- Added `-rotate` (Matus Goljer). - -### From 1.5 to 1.6 - -- Added `-min`, `-max`, `-min-by`, and `-max-by` (Johan Andersson). - -### From 1.4 to 1.5 - -- Added `-sum` and `-product` (Johan Andersson). - -### From 1.3 to 1.4 - -- Added `-sort`. -- Added `-reduce-r` (Matus Goljer). -- Added `-reduce-r-from` (Matus Goljer). - -### From 1.2 to 1.3 - -- Added `-partition-in-steps`. -- Added `-partition-all-in-steps`. - -### From 1.1 to 1.2 - -- Added `-last` (Matus Goljer). -- Added `-insert-at` (Emanuel Evans). -- Added `-when-let` and `-if-let` (Emanuel Evans). -- Added `-when-let*` and `-if-let*` (Emanuel Evans). -- Various bugfixes. +Assignment")`](https://gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html). ## Contributors