Update dash

This commit is contained in:
dbo 2021-01-01 17:31:26 +01:00
parent 8d7302f38d
commit b51153e587
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
8 changed files with 488 additions and 589 deletions

View File

@ -1,26 +0,0 @@
;;; dash-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "dash" "dash.el" (0 0 0 0))
;;; Generated autoloads from dash.el
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "dash" '("dash-" "-keep" "-butlast" "-non" "-only-some" "-zip" "-e" "->" "-a" "-gr" "-when-let" "-d" "-l" "-s" "-p" "-r" "-m" "-i" "-f" "-u" "-value-to-list" "-t" "--" "-c" "!cons" "!cdr")))
;;;***
;;;### (autoloads nil nil ("dash-pkg.el") (0 0 0 0))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; dash-autoloads.el ends here

View File

@ -1,9 +0,0 @@
(define-package "dash" "2.17.0" "A modern list library for Emacs" 'nil :keywords
'("lists")
:authors
'(("Magnar Sveen" . "magnars@gmail.com"))
:maintainer
'("Magnar Sveen" . "magnars@gmail.com"))
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -0,0 +1,70 @@
;;; dash-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "dash" "dash.el" (0 0 0 0))
;;; Generated autoloads from dash.el
(autoload 'dash-fontify-mode "dash" "\
Toggle fontification of Dash special variables.
If called interactively, enable Dash-Fontify mode if ARG is
positive, and disable it if ARG is zero or negative. If called
from Lisp, also enable the mode if ARG is omitted or nil, and
toggle it if ARG is `toggle'; disable the mode otherwise.
Dash-Fontify mode is a buffer-local minor mode intended for Emacs
Lisp buffers. Enabling it causes the special variables bound in
anaphoric Dash macros to be fontified. These anaphoras include
`it', `it-index', `acc', and `other'. In older Emacs versions
which do not dynamically detect macros, Dash-Fontify mode
additionally fontifies Dash macro calls.
See also `dash-fontify-mode-lighter' and
`global-dash-fontify-mode'.
\(fn &optional ARG)" t nil)
(put 'global-dash-fontify-mode 'globalized-minor-mode t)
(defvar global-dash-fontify-mode nil "\
Non-nil if Global Dash-Fontify mode is enabled.
See the `global-dash-fontify-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `global-dash-fontify-mode'.")
(custom-autoload 'global-dash-fontify-mode "dash" nil)
(autoload 'global-dash-fontify-mode "dash" "\
Toggle Dash-Fontify mode in all buffers.
With prefix ARG, enable Global Dash-Fontify mode if ARG is positive;
otherwise, disable it. If called from Lisp, enable the mode if
ARG is omitted or nil.
Dash-Fontify mode is enabled in all buffers where
`dash--turn-on-fontify-mode' would do it.
See `dash-fontify-mode' for more information on Dash-Fontify mode.
\(fn &optional ARG)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "dash" '("!cdr" "!cons" "--" "->" "-a" "-butlast" "-c" "-d" "-e" "-f" "-gr" "-i" "-keep" "-l" "-m" "-non" "-only-some" "-p" "-r" "-s" "-t" "-u" "-value-to-list" "-when-let" "-zip" "dash-")))
;;;***
;;;### (autoloads nil nil ("dash-pkg.el") (0 0 0 0))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; dash-autoloads.el ends here

View File

@ -0,0 +1,9 @@
(define-package "dash" "20201231.1620" "A modern list library for Emacs" 'nil :commit "78fee36e7e7c02595e51fcacf067308be115c22c" :authors
(("Magnar Sveen" . "magnars@gmail.com"))
:maintainer
("Magnar Sveen" . "magnars@gmail.com")
:keywords
("extensions" "lisp"))
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -4,7 +4,7 @@
;; Author: Magnar Sveen <magnars@gmail.com> ;; Author: Magnar Sveen <magnars@gmail.com>
;; Version: 2.17.0 ;; Version: 2.17.0
;; Keywords: lists ;; Keywords: extensions, lisp
;; This program is free software; you can redistribute it and/or modify ;; 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 ;; it under the terms of the GNU General Public License as published by
@ -40,22 +40,11 @@
(require 'cl))) (require 'cl)))
(defgroup dash () (defgroup dash ()
"Customize group for dash.el" "Customize group for Dash, a modern list library."
:group 'extensions
:group 'lisp :group 'lisp
:prefix "dash-") :prefix "dash-")
(defun dash--enable-fontlock (symbol value)
(when value
(dash-enable-font-lock))
(set-default symbol value))
(defcustom dash-enable-fontlock nil
"If non-nil, enable fontification of dash functions, macros and
special values."
:type 'boolean
:set 'dash--enable-fontlock
:group 'dash)
(defmacro !cons (car cdr) (defmacro !cons (car cdr)
"Destructive: Set CDR to the cons of CAR and CDR." "Destructive: Set CDR to the cons of CAR and CDR."
`(setq ,cdr (cons ,car ,cdr))) `(setq ,cdr (cons ,car ,cdr)))
@ -102,10 +91,9 @@ Note: `it' is not required in each form."
(defun -each (list fn) (defun -each (list fn)
"Call FN with every item in LIST. Return nil, used for side-effects only." "Call FN with every item in LIST. Return nil, used for side-effects only."
(declare (indent 1))
(--each list (funcall fn it))) (--each list (funcall fn it)))
(put '-each 'lisp-indent-function 1)
(defalias '--each-indexed '--each) (defalias '--each-indexed '--each)
(defun -each-indexed (list fn) (defun -each-indexed (list fn)
@ -114,31 +102,30 @@ Note: `it' is not required in each form."
In the anaphoric form `--each-indexed', the index is exposed as symbol `it-index'. In the anaphoric form `--each-indexed', the index is exposed as symbol `it-index'.
See also: `-map-indexed'." See also: `-map-indexed'."
(declare (indent 1))
(--each list (funcall fn it-index it))) (--each list (funcall fn it-index it)))
(put '-each-indexed 'lisp-indent-function 1)
(defmacro --each-while (list pred &rest body) (defmacro --each-while (list pred &rest body)
"Anaphoric form of `-each-while'." "Anaphoric form of `-each-while'."
(declare (debug (form form body)) (declare (debug (form form body))
(indent 2)) (indent 2))
(let ((l (make-symbol "list")) (let ((l (make-symbol "list")))
(c (make-symbol "continue")))
`(let ((,l ,list) `(let ((,l ,list)
(,c t) (it-index 0)
(it-index 0)) it)
(while (and ,l ,c) (ignore it)
(let ((it (car ,l))) (while (when ,l
(if (not ,pred) (setq ,c nil) ,@body)) (setq it (pop ,l))
(setq it-index (1+ it-index)) ,pred)
(!cdr ,l))))) ,@body
(setq it-index (1+ it-index))))))
(defun -each-while (list pred fn) (defun -each-while (list pred fn)
"Call FN with every item in LIST while (PRED item) is non-nil. "Call FN with every item in LIST while (PRED item) is non-nil.
Return nil, used for side-effects only." Return nil, used for side-effects only."
(declare (indent 2))
(--each-while list (funcall pred it) (funcall fn it))) (--each-while list (funcall pred it) (funcall fn it)))
(put '-each-while 'lisp-indent-function 2)
(defmacro --each-r (list &rest body) (defmacro --each-r (list &rest body)
"Anaphoric form of `-each-r'." "Anaphoric form of `-each-r'."
(declare (debug (form body)) (declare (debug (form body))
@ -195,10 +182,9 @@ Return nil, used for side-effects only."
(defun -dotimes (num fn) (defun -dotimes (num fn)
"Repeatedly calls FN (presumably for side-effects) passing in integers from 0 through NUM-1." "Repeatedly calls FN (presumably for side-effects) passing in integers from 0 through NUM-1."
(declare (indent 1))
(--dotimes num (funcall fn it))) (--dotimes num (funcall fn it)))
(put '-dotimes 'lisp-indent-function 1)
(defun -map (fn list) (defun -map (fn list)
"Return a new list consisting of the result of applying FN to the items in LIST." "Return a new list consisting of the result of applying FN to the items in LIST."
(mapcar fn list)) (mapcar fn list))
@ -1328,16 +1314,18 @@ a variable number of arguments, such that
is identity (given that the lists are the same length). is identity (given that the lists are the same length).
Note in particular that calling this on a list of two lists will Note in particular that calling this on a list of two lists will
return a list of cons-cells such that the aboce identity works. return a list of cons-cells such that the above identity works.
See also: `-zip'" See also: `-zip'"
(apply '-zip lists)) (apply '-zip lists))
(defun -cycle (list) (defun -cycle (list)
"Return an infinite copy of LIST that will cycle through the "Return an infinite circular copy of LIST.
elements and repeat from the beginning." The returned list cycles through the elements of LIST and repeats
from the beginning."
(declare (pure t) (side-effect-free t)) (declare (pure t) (side-effect-free t))
(let ((newlist (-map 'identity list))) ;; Also works with sequences that aren't lists.
(let ((newlist (append list ())))
(nconc newlist newlist))) (nconc newlist newlist)))
(defun -pad (fill-value &rest lists) (defun -pad (fill-value &rest lists)
@ -1581,7 +1569,7 @@ and when that result is non-nil, through the next form, etc."
,@more)))) ,@more))))
(defmacro -some--> (x &optional form &rest more) (defmacro -some--> (x &optional form &rest more)
"When expr in non-nil, thread it through the first form (via `-->'), "When expr is non-nil, thread it through the first form (via `-->'),
and when that result is non-nil, through the next form, etc." and when that result is non-nil, through the next form, etc."
(declare (debug ->) (declare (debug ->)
(indent 1)) (indent 1))
@ -2775,298 +2763,157 @@ structure such as plist or alist."
(declare (pure t) (side-effect-free t)) (declare (pure t) (side-effect-free t))
(-tree-map 'identity list)) (-tree-map 'identity list))
(defun dash-enable-font-lock () ;;; Font lock
"Add syntax highlighting to dash functions, macros and magic values."
(eval-after-load 'lisp-mode (defvar dash--keywords
'(progn `(;; TODO: Do not fontify the following automatic variables
(let ((new-keywords '( ;; globally; detect and limit to their local anaphoric scope.
"!cons" (,(concat "\\_<" (regexp-opt '("acc" "it" "it-index" "other")) "\\_>")
"!cdr" 0 font-lock-variable-name-face)
"-each" ;; Elisp macro fontification was static prior to Emacs 25.
"--each" ,@(when (< emacs-major-version 25)
"-each-indexed" (let ((macs '("!cdr"
"--each-indexed" "!cons"
"-each-while" "-->"
"--each-while" "--all?"
"-doto" "--annotate"
"-dotimes" "--any?"
"--dotimes" "--count"
"-map" "--dotimes"
"--map" "--doto"
"-reduce-from" "--drop-while"
"--reduce-from" "--each"
"-reduce" "--each-r"
"--reduce" "--each-r-while"
"-reduce-r-from" "--each-while"
"--reduce-r-from" "--filter"
"-reduce-r" "--find-index"
"--reduce-r" "--find-indices"
"-reductions-from" "--find-last-index"
"-reductions-r-from" "--first"
"-reductions" "--fix"
"-reductions-r" "--group-by"
"-filter" "--if-let"
"--filter" "--iterate"
"-select" "--keep"
"--select" "--last"
"-remove" "--map"
"--remove" "--map-first"
"-reject" "--map-indexed"
"--reject" "--map-last"
"-remove-first" "--map-when"
"--remove-first" "--mapcat"
"-reject-first" "--max-by"
"--reject-first" "--min-by"
"-remove-last" "--none?"
"--remove-last" "--only-some?"
"-reject-last" "--partition-by"
"--reject-last" "--partition-by-header"
"-remove-item" "--reduce"
"-non-nil" "--reduce-from"
"-keep" "--reduce-r"
"--keep" "--reduce-r-from"
"-map-indexed" "--remove"
"--map-indexed" "--remove-first"
"-splice" "--remove-last"
"--splice" "--separate"
"-splice-list" "--some"
"--splice-list" "--sort"
"-map-when" "--splice"
"--map-when" "--splice-list"
"-replace-where" "--split-when"
"--replace-where" "--split-with"
"-map-first" "--take-while"
"--map-first" "--tree-map"
"-map-last" "--tree-map-nodes"
"--map-last" "--tree-mapreduce"
"-replace" "--tree-mapreduce-from"
"-replace-first" "--tree-reduce"
"-replace-last" "--tree-reduce-from"
"-flatten" "--tree-seq"
"-flatten-n" "--unfold"
"-concat" "--update-at"
"-mapcat" "--when-let"
"--mapcat" "--zip-with"
"-copy" "->"
"-cons*" "->>"
"-snoc" "-as->"
"-first" "-doto"
"--first" "-if-let"
"-find" "-if-let*"
"--find" "-lambda"
"-some" "-let"
"--some" "-let*"
"-any" "-setq"
"--any" "-some-->"
"-last" "-some->"
"--last" "-some->>"
"-first-item" "-split-on"
"-second-item" "-when-let"
"-third-item" "-when-let*")))
"-fourth-item" `((,(concat "(" (regexp-opt macs 'symbols)) . 1)))))
"-fifth-item" "Font lock keywords for `dash-fontify-mode'.")
"-last-item"
"-butlast" (defcustom dash-fontify-mode-lighter nil
"-count" "Mode line lighter for `dash-fontify-mode'.
"--count" Either a string to display in the mode line when
"-any?" `dash-fontify-mode' is on, or nil to display
"--any?" nothing (the default)."
"-some?" :package-version '(dash . "2.18.0")
"--some?" :group 'dash
"-any-p" :type '(choice (string :tag "Lighter" :value " Dash")
"--any-p" (const :tag "Nothing" nil)))
"-some-p"
"--some-p" ;;;###autoload
"-some->" (define-minor-mode dash-fontify-mode
"-some->>" "Toggle fontification of Dash special variables.
"-some-->"
"-all?" Dash-Fontify mode is a buffer-local minor mode intended for Emacs
"-all-p" Lisp buffers. Enabling it causes the special variables bound in
"--all?" anaphoric Dash macros to be fontified. These anaphoras include
"--all-p" `it', `it-index', `acc', and `other'. In older Emacs versions
"-every?" which do not dynamically detect macros, Dash-Fontify mode
"--every?" additionally fontifies Dash macro calls.
"-all-p"
"--all-p" See also `dash-fontify-mode-lighter' and
"-every-p" `global-dash-fontify-mode'."
"--every-p" :group 'dash :lighter dash-fontify-mode-lighter
"-none?" (if dash-fontify-mode
"--none?" (font-lock-add-keywords nil dash--keywords t)
"-none-p" (font-lock-remove-keywords nil dash--keywords))
"--none-p" (cond ((fboundp 'font-lock-flush) ;; Added in Emacs 25.
"-only-some?" (font-lock-flush))
"--only-some?" ;; `font-lock-fontify-buffer' unconditionally enables
"-only-some-p" ;; `font-lock-mode' and is marked `interactive-only' in later
"--only-some-p" ;; Emacs versions which have `font-lock-flush', so we guard
"-slice" ;; and pacify as needed, respectively.
"-take" (font-lock-mode
"-drop" (with-no-warnings
"-drop-last" (font-lock-fontify-buffer)))))
"-take-last"
"-take-while" (defun dash--turn-on-fontify-mode ()
"--take-while" "Enable `dash-fontify-mode' if in an Emacs Lisp buffer."
"-drop-while" (when (derived-mode-p #'emacs-lisp-mode)
"--drop-while" (dash-fontify-mode)))
"-split-at"
"-rotate" ;;;###autoload
"-insert-at" (define-globalized-minor-mode global-dash-fontify-mode
"-replace-at" dash-fontify-mode dash--turn-on-fontify-mode
"-update-at" :group 'dash)
"--update-at"
"-remove-at" (defcustom dash-enable-fontlock nil
"-remove-at-indices" "If non-nil, fontify Dash macro calls and special variables."
"-split-with" :group 'dash
"--split-with" :set (lambda (sym val)
"-split-on" (set-default sym val)
"-split-when" (global-dash-fontify-mode (if val 1 0)))
"--split-when" :type 'boolean)
"-separate"
"--separate" (make-obsolete-variable
"-partition-all-in-steps" 'dash-enable-fontlock #'global-dash-fontify-mode "2.18.0")
"-partition-in-steps"
"-partition-all" (define-obsolete-function-alias
"-partition" 'dash-enable-font-lock #'global-dash-fontify-mode "2.18.0")
"-partition-after-item"
"-partition-after-pred"
"-partition-before-item"
"-partition-before-pred"
"-partition-by"
"--partition-by"
"-partition-by-header"
"--partition-by-header"
"-group-by"
"--group-by"
"-interpose"
"-interleave"
"-unzip"
"-zip-with"
"--zip-with"
"-zip"
"-zip-fill"
"-zip-lists"
"-zip-pair"
"-cycle"
"-pad"
"-annotate"
"--annotate"
"-table"
"-table-flat"
"-partial"
"-elem-index"
"-elem-indices"
"-find-indices"
"--find-indices"
"-find-index"
"--find-index"
"-find-last-index"
"--find-last-index"
"-select-by-indices"
"-select-columns"
"-select-column"
"-grade-up"
"-grade-down"
"->"
"->>"
"-->"
"-as->"
"-when-let"
"-when-let*"
"--when-let"
"-if-let"
"-if-let*"
"--if-let"
"-let*"
"-let"
"-lambda"
"-distinct"
"-uniq"
"-union"
"-intersection"
"-difference"
"-powerset"
"-permutations"
"-inits"
"-tails"
"-common-prefix"
"-common-suffix"
"-contains?"
"-contains-p"
"-same-items?"
"-same-items-p"
"-is-prefix-p"
"-is-prefix?"
"-is-suffix-p"
"-is-suffix?"
"-is-infix-p"
"-is-infix?"
"-sort"
"--sort"
"-list"
"-repeat"
"-sum"
"-running-sum"
"-product"
"-running-product"
"-max"
"-min"
"-max-by"
"--max-by"
"-min-by"
"--min-by"
"-iterate"
"--iterate"
"-fix"
"--fix"
"-unfold"
"--unfold"
"-cons-pair?"
"-cons-pair-p"
"-cons-to-list"
"-value-to-list"
"-tree-mapreduce-from"
"--tree-mapreduce-from"
"-tree-mapreduce"
"--tree-mapreduce"
"-tree-map"
"--tree-map"
"-tree-reduce-from"
"--tree-reduce-from"
"-tree-reduce"
"--tree-reduce"
"-tree-seq"
"--tree-seq"
"-tree-map-nodes"
"--tree-map-nodes"
"-clone"
"-rpartial"
"-juxt"
"-applify"
"-on"
"-flip"
"-const"
"-cut"
"-orfn"
"-andfn"
"-iteratefn"
"-fixfn"
"-prodfn"
))
(special-variables '(
"it"
"it-index"
"acc"
"other"
)))
(font-lock-add-keywords 'emacs-lisp-mode `((,(concat "\\_<" (regexp-opt special-variables 'paren) "\\_>")
1 font-lock-variable-name-face)) 'append)
(font-lock-add-keywords 'emacs-lisp-mode `((,(concat "(\\s-*" (regexp-opt new-keywords 'paren) "\\_>")
1 font-lock-keyword-face)) 'append))
(--each (buffer-list)
(with-current-buffer it
(when (and (eq major-mode 'emacs-lisp-mode)
(boundp 'font-lock-mode)
font-lock-mode)
(font-lock-refresh-defaults)))))))
(provide 'dash) (provide 'dash)
;;; dash.el ends here ;;; dash.el ends here

View File

@ -58,7 +58,7 @@ This manual is for dash.el version 2.12.1.
Installation Installation
* Using in a package:: * Using in a package::
* Syntax highlighting of dash functions:: * Fontification of special variables::
Functions Functions
@ -91,7 +91,8 @@ File: dash.info, Node: Installation, Next: Functions, Prev: Top, Up: Top
1 Installation 1 Installation
************** **************
Its available on Melpa (https://melpa.org/); use M-x package-install: Its available on GNU ELPA (https://elpa.gnu.org/) and MELPA
(https://melpa.org/); use M-x package-install:
M-x package-install <RET> dash M-x package-install <RET> dash
Install the dash library. Install the dash library.
@ -105,10 +106,10 @@ your load path somewhere.
* Menu: * Menu:
* Using in a package:: * Using in a package::
* Syntax highlighting of dash functions:: * Fontification of special variables::
 
File: dash.info, Node: Using in a package, Next: Syntax highlighting of dash functions, Up: Installation File: dash.info, Node: Using in a package, Next: Fontification of special variables, Up: Installation
1.1 Using in a package 1.1 Using in a package
====================== ======================
@ -122,15 +123,21 @@ To get function combinators:
;; Package-Requires: ((dash "2.12.1") (dash-functional "1.2.0") (emacs "24")) ;; Package-Requires: ((dash "2.12.1") (dash-functional "1.2.0") (emacs "24"))
 
File: dash.info, Node: Syntax highlighting of dash functions, Prev: Using in a package, Up: Installation File: dash.info, Node: Fontification of special variables, Prev: Using in a package, Up: Installation
1.2 Syntax highlighting of dash functions 1.2 Fontification of special variables
========================================= ======================================
Font lock of dash functions in emacs lisp buffers is now optional. Font lock of special Dash variables (it, acc, etc.) in Emacs Lisp
Include this in your emacs settings to get syntax highlighting: buffers can optionally be enabled with the autoloaded minor mode
dash-fontify-mode. In older Emacs versions which do not dynamically
detect macros, the minor mode also fontifies Dash macro calls.
(eval-after-load 'dash '(dash-enable-font-lock)) To automatically enable the minor mode in all Emacs Lisp buffers,
just call its autoloaded global counterpart global-dash-fontify-mode,
either interactively or from your user-init-file:
(global-dash-fontify-mode)
 
File: dash.info, Node: Functions, Next: Development, Prev: Installation, Up: Top File: dash.info, Node: Functions, Next: Development, Prev: Installation, Up: Top
@ -1689,7 +1696,7 @@ Other list functions not fit to be classified elsewhere.
is identity (given that the lists are the same length). is identity (given that the lists are the same length).
Note in particular that calling this on a list of two lists will Note in particular that calling this on a list of two lists will
return a list of cons-cells such that the aboce identity works. return a list of cons-cells such that the above identity works.
See also: -zip (*note -zip::) See also: -zip (*note -zip::)
@ -1701,8 +1708,8 @@ Other list functions not fit to be classified elsewhere.
⇒ '((1 . 3) (2 . 4)) ⇒ '((1 . 3) (2 . 4))
-- Function: -cycle (list) -- Function: -cycle (list)
Return an infinite copy of LIST that will cycle through the Return an infinite circular copy of LIST. The returned list cycles
elements and repeat from the beginning. through the elements of LIST and repeats from the beginning.
(-take 5 (-cycle '(1 2 3))) (-take 5 (-cycle '(1 2 3)))
⇒ '(1 2 3 1 2) ⇒ '(1 2 3 1 2)
@ -2132,7 +2139,7 @@ File: dash.info, Node: Threading macros, Next: Binding, Prev: Tree operations
⇒ 106 ⇒ 106
-- Macro: -some--> (x &optional form &rest more) -- Macro: -some--> (x &optional form &rest more)
When expr in non-nil, thread it through the first form (via --> When expr is non-nil, thread it through the first form (via -->
(*note -->::)), and when that result is non-nil, through the next (*note -->::)), and when that result is non-nil, through the next
form, etc. form, etc.
@ -2467,10 +2474,12 @@ Functions iterating over lists for side-effect only.
Call FN with every item in LIST while (PRED item) is non-nil. Call FN with every item in LIST while (PRED item) is non-nil.
Return nil, used for side-effects only. Return nil, used for side-effects only.
(let (s) (-each-while '(2 4 5 6) 'even? (lambda (item) (!cons item s))) s) (let (s) (-each-while '(2 4 5 6) 'even? (lambda (item) (push item s))) s)
⇒ '(4 2) ⇒ '(4 2)
(let (s) (--each-while '(1 2 3 4) (< it 3) (!cons it s)) s) (let (s) (--each-while '(1 2 3 4) (< it 3) (push it s)) s)
⇒ '(2 1) ⇒ '(2 1)
(let ((s 0)) (--each-while '(1 3 4 5) (odd? it) (setq s (+ s it))) s)
⇒ 4
-- Function: -each-indexed (list fn) -- Function: -each-indexed (list fn)
Call (FN index item) for each item in LIST. Call (FN index item) for each item in LIST.
@ -2564,8 +2573,8 @@ These combinators require Emacs 24 for its lexical scope. So they are
offered in a separate package: dash-functional. offered in a separate package: dash-functional.
-- Function: -partial (fn &rest args) -- Function: -partial (fn &rest args)
Takes a function FN and fewer than the normal arguments to FN, and Take a function FN and fewer than the normal arguments to FN, and
returns a fn that takes a variable number of additional ARGS. When return a fn that takes a variable number of additional ARGS. When
called, the returned function calls FN with ARGS first and then called, the returned function calls FN with ARGS first and then
additional args. additional args.
@ -2740,7 +2749,7 @@ offered in a separate package: dash-functional.
1. Iteration converges to the fixpoint, with equality being tested 1. Iteration converges to the fixpoint, with equality being tested
using EQUAL-TEST. If EQUAL-TEST is not specified, equal is used. using EQUAL-TEST. If EQUAL-TEST is not specified, equal is used.
For functions over the floating point numbers, it may be necessary For functions over the floating point numbers, it may be necessary
to provide an appropriate appoximate comparison test. to provide an appropriate approximate comparison test.
2. HALT-TEST returns a non-nil value. HALT-TEST defaults to a 2. HALT-TEST returns a non-nil value. HALT-TEST defaults to a
simple counter that returns t after -fixfn-max-iterations, to simple counter that returns t after -fixfn-max-iterations, to
@ -2981,7 +2990,7 @@ Index
* !cons: Destructive operations. * !cons: Destructive operations.
(line 6) (line 6)
* -->: Threading macros. (line 32) * -->: Threading macros. (line 32)
* --doto: Side-effects. (line 81) * --doto: Side-effects. (line 83)
* ->: Threading macros. (line 6) * ->: Threading macros. (line 6)
* ->>: Threading macros. (line 19) * ->>: Threading macros. (line 19)
* -all?: Predicates. (line 18) * -all?: Predicates. (line 18)
@ -3013,15 +3022,15 @@ Index
(line 168) (line 168)
* -difference: Set operations. (line 20) * -difference: Set operations. (line 20)
* -distinct: Set operations. (line 62) * -distinct: Set operations. (line 62)
* -dotimes: Side-effects. (line 61) * -dotimes: Side-effects. (line 63)
* -doto: Side-effects. (line 70) * -doto: Side-effects. (line 72)
* -drop: Sublist selection. (line 124) * -drop: Sublist selection. (line 124)
* -drop-last: Sublist selection. (line 136) * -drop-last: Sublist selection. (line 136)
* -drop-while: Sublist selection. (line 157) * -drop-while: Sublist selection. (line 157)
* -each: Side-effects. (line 8) * -each: Side-effects. (line 8)
* -each-indexed: Side-effects. (line 28) * -each-indexed: Side-effects. (line 30)
* -each-r: Side-effects. (line 41) * -each-r: Side-effects. (line 43)
* -each-r-while: Side-effects. (line 52) * -each-r-while: Side-effects. (line 54)
* -each-while: Side-effects. (line 19) * -each-while: Side-effects. (line 19)
* -elem-index: Indexing. (line 9) * -elem-index: Indexing. (line 9)
* -elem-indices: Indexing. (line 21) * -elem-indices: Indexing. (line 21)
@ -3201,206 +3210,206 @@ Index
 
Tag Table: Tag Table:
Node: Top946 Node: Top946
Node: Installation2425 Node: Installation2422
Node: Using in a package2958 Node: Using in a package2989
Node: Syntax highlighting of dash functions3322 Node: Fontification of special variables3350
Node: Functions3705 Node: Functions4054
Node: Maps4916 Node: Maps5265
Ref: -map5211 Ref: -map5560
Ref: -map-when5552 Ref: -map-when5901
Ref: -map-first6130 Ref: -map-first6479
Ref: -map-last6608 Ref: -map-last6957
Ref: -map-indexed7081 Ref: -map-indexed7430
Ref: -annotate7561 Ref: -annotate7910
Ref: -splice8051 Ref: -splice8400
Ref: -splice-list8832 Ref: -splice-list9181
Ref: -mapcat9294 Ref: -mapcat9643
Ref: -copy9670 Ref: -copy10019
Node: Sublist selection9874 Node: Sublist selection10223
Ref: -filter10067 Ref: -filter10416
Ref: -remove10519 Ref: -remove10868
Ref: -remove-first10925 Ref: -remove-first11274
Ref: -remove-last11452 Ref: -remove-last11801
Ref: -remove-item11973 Ref: -remove-item12322
Ref: -non-nil12368 Ref: -non-nil12717
Ref: -slice12527 Ref: -slice12876
Ref: -take13059 Ref: -take13408
Ref: -take-last13367 Ref: -take-last13716
Ref: -drop13690 Ref: -drop14039
Ref: -drop-last13963 Ref: -drop-last14312
Ref: -take-while14223 Ref: -take-while14572
Ref: -drop-while14573 Ref: -drop-while14922
Ref: -select-by-indices14929 Ref: -select-by-indices15278
Ref: -select-columns15443 Ref: -select-columns15792
Ref: -select-column16149 Ref: -select-column16498
Node: List to list16613 Node: List to list16962
Ref: -keep16805 Ref: -keep17154
Ref: -concat17308 Ref: -concat17657
Ref: -flatten17605 Ref: -flatten17954
Ref: -flatten-n18364 Ref: -flatten-n18713
Ref: -replace18751 Ref: -replace19100
Ref: -replace-first19214 Ref: -replace-first19563
Ref: -replace-last19711 Ref: -replace-last20060
Ref: -insert-at20201 Ref: -insert-at20550
Ref: -replace-at20528 Ref: -replace-at20877
Ref: -update-at20918 Ref: -update-at21267
Ref: -remove-at21409 Ref: -remove-at21758
Ref: -remove-at-indices21897 Ref: -remove-at-indices22246
Node: Reductions22479 Node: Reductions22828
Ref: -reduce-from22648 Ref: -reduce-from22997
Ref: -reduce-r-from23414 Ref: -reduce-r-from23763
Ref: -reduce24181 Ref: -reduce24530
Ref: -reduce-r24910 Ref: -reduce-r25259
Ref: -reductions-from25781 Ref: -reductions-from26130
Ref: -reductions-r-from26496 Ref: -reductions-r-from26845
Ref: -reductions27221 Ref: -reductions27570
Ref: -reductions-r27846 Ref: -reductions-r28195
Ref: -count28481 Ref: -count28830
Ref: -sum28705 Ref: -sum29054
Ref: -running-sum28894 Ref: -running-sum29243
Ref: -product29187 Ref: -product29536
Ref: -running-product29396 Ref: -running-product29745
Ref: -inits29709 Ref: -inits30058
Ref: -tails29957 Ref: -tails30306
Ref: -common-prefix30204 Ref: -common-prefix30553
Ref: -common-suffix30501 Ref: -common-suffix30850
Ref: -min30798 Ref: -min31147
Ref: -min-by31024 Ref: -min-by31373
Ref: -max31547 Ref: -max31896
Ref: -max-by31772 Ref: -max-by32121
Node: Unfolding32300 Node: Unfolding32649
Ref: -iterate32539 Ref: -iterate32888
Ref: -unfold32984 Ref: -unfold33333
Node: Predicates33792 Node: Predicates34141
Ref: -any?33916 Ref: -any?34265
Ref: -all?34236 Ref: -all?34585
Ref: -none?34566 Ref: -none?34915
Ref: -only-some?34868 Ref: -only-some?35217
Ref: -contains?35353 Ref: -contains?35702
Ref: -same-items?35742 Ref: -same-items?36091
Ref: -is-prefix?36127 Ref: -is-prefix?36476
Ref: -is-suffix?36450 Ref: -is-suffix?36799
Ref: -is-infix?36773 Ref: -is-infix?37122
Node: Partitioning37127 Node: Partitioning37476
Ref: -split-at37315 Ref: -split-at37664
Ref: -split-with37600 Ref: -split-with37949
Ref: -split-on38003 Ref: -split-on38352
Ref: -split-when38679 Ref: -split-when39028
Ref: -separate39319 Ref: -separate39668
Ref: -partition39761 Ref: -partition40110
Ref: -partition-all40213 Ref: -partition-all40562
Ref: -partition-in-steps40641 Ref: -partition-in-steps40990
Ref: -partition-all-in-steps41138 Ref: -partition-all-in-steps41487
Ref: -partition-by41623 Ref: -partition-by41972
Ref: -partition-by-header42005 Ref: -partition-by-header42354
Ref: -partition-after-pred42609 Ref: -partition-after-pred42958
Ref: -partition-before-pred42953 Ref: -partition-before-pred43302
Ref: -partition-before-item43304 Ref: -partition-before-item43653
Ref: -partition-after-item43615 Ref: -partition-after-item43964
Ref: -group-by43921 Ref: -group-by44270
Node: Indexing44358 Node: Indexing44707
Ref: -elem-index44560 Ref: -elem-index44909
Ref: -elem-indices44955 Ref: -elem-indices45304
Ref: -find-index45338 Ref: -find-index45687
Ref: -find-last-index45827 Ref: -find-last-index46176
Ref: -find-indices46331 Ref: -find-indices46680
Ref: -grade-up46739 Ref: -grade-up47088
Ref: -grade-down47142 Ref: -grade-down47491
Node: Set operations47552 Node: Set operations47901
Ref: -union47735 Ref: -union48084
Ref: -difference48177 Ref: -difference48526
Ref: -intersection48594 Ref: -intersection48943
Ref: -powerset49031 Ref: -powerset49380
Ref: -permutations49244 Ref: -permutations49593
Ref: -distinct49544 Ref: -distinct49893
Node: Other list operations49922 Node: Other list operations50271
Ref: -rotate50147 Ref: -rotate50496
Ref: -repeat50517 Ref: -repeat50866
Ref: -cons*50780 Ref: -cons*51129
Ref: -snoc51167 Ref: -snoc51516
Ref: -interpose51580 Ref: -interpose51929
Ref: -interleave51878 Ref: -interleave52227
Ref: -zip-with52247 Ref: -zip-with52596
Ref: -zip52964 Ref: -zip53313
Ref: -zip-lists53796 Ref: -zip-lists54145
Ref: -zip-fill54497 Ref: -zip-fill54846
Ref: -unzip54820 Ref: -unzip55169
Ref: -cycle55565 Ref: -cycle55914
Ref: -pad55938 Ref: -pad56316
Ref: -table56261 Ref: -table56639
Ref: -table-flat57050 Ref: -table-flat57428
Ref: -first58058 Ref: -first58436
Ref: -some58430 Ref: -some58808
Ref: -last58739 Ref: -last59117
Ref: -first-item59073 Ref: -first-item59451
Ref: -second-item59489 Ref: -second-item59867
Ref: -third-item59769 Ref: -third-item60147
Ref: -fourth-item60047 Ref: -fourth-item60425
Ref: -fifth-item60313 Ref: -fifth-item60691
Ref: -last-item60575 Ref: -last-item60953
Ref: -butlast60867 Ref: -butlast61245
Ref: -sort61114 Ref: -sort61492
Ref: -list61603 Ref: -list61981
Ref: -fix61934 Ref: -fix62312
Node: Tree operations62474 Node: Tree operations62852
Ref: -tree-seq62670 Ref: -tree-seq63048
Ref: -tree-map63528 Ref: -tree-map63906
Ref: -tree-map-nodes63971 Ref: -tree-map-nodes64349
Ref: -tree-reduce64821 Ref: -tree-reduce65199
Ref: -tree-reduce-from65703 Ref: -tree-reduce-from66081
Ref: -tree-mapreduce66304 Ref: -tree-mapreduce66682
Ref: -tree-mapreduce-from67164 Ref: -tree-mapreduce-from67542
Ref: -clone68450 Ref: -clone68828
Node: Threading macros68778 Node: Threading macros69156
Ref: ->68923 Ref: ->69301
Ref: ->>69414 Ref: ->>69792
Ref: -->69919 Ref: -->70297
Ref: -as->70475 Ref: -as->70853
Ref: -some->70930 Ref: -some->71308
Ref: -some->>71304 Ref: -some->>71682
Ref: -some-->71740 Ref: -some-->72118
Node: Binding72211 Node: Binding72589
Ref: -when-let72423 Ref: -when-let72801
Ref: -when-let*72908 Ref: -when-let*73286
Ref: -if-let73431 Ref: -if-let73809
Ref: -if-let*73826 Ref: -if-let*74204
Ref: -let74443 Ref: -let74821
Ref: -let*80533 Ref: -let*80911
Ref: -lambda81473 Ref: -lambda81851
Ref: -setq82270 Ref: -setq82648
Node: Side-effects83086 Node: Side-effects83464
Ref: -each83280 Ref: -each83658
Ref: -each-while83687 Ref: -each-while84065
Ref: -each-indexed84047 Ref: -each-indexed84523
Ref: -each-r84565 Ref: -each-r85041
Ref: -each-r-while84998 Ref: -each-r-while85474
Ref: -dotimes85373 Ref: -dotimes85849
Ref: -doto85676 Ref: -doto86152
Ref: --doto86104 Ref: --doto86580
Node: Destructive operations86379 Node: Destructive operations86855
Ref: !cons86552 Ref: !cons87028
Ref: !cdr86758 Ref: !cdr87234
Node: Function combinators86953 Node: Function combinators87429
Ref: -partial87227 Ref: -partial87703
Ref: -rpartial87623 Ref: -rpartial88097
Ref: -juxt88026 Ref: -juxt88500
Ref: -compose88458 Ref: -compose88932
Ref: -applify89011 Ref: -applify89485
Ref: -on89442 Ref: -on89916
Ref: -flip89968 Ref: -flip90442
Ref: -const90280 Ref: -const90754
Ref: -cut90619 Ref: -cut91093
Ref: -not91105 Ref: -not91579
Ref: -orfn91415 Ref: -orfn91889
Ref: -andfn91849 Ref: -andfn92323
Ref: -iteratefn92344 Ref: -iteratefn92818
Ref: -fixfn93047 Ref: -fixfn93521
Ref: -prodfn94609 Ref: -prodfn95084
Node: Development95677 Node: Development96152
Node: Contribute96026 Node: Contribute96501
Node: Changes96774 Node: Changes97249
Node: Contributors99772 Node: Contributors100247
Node: Index101391 Node: Index101866
 
End Tag Table End Tag Table

View File

@ -576,8 +576,7 @@
;; * Essential external packages ;; * Essential external packages
(use-package dash (use-package dash)
:pin "melpa-stable")
(use-package hydra (use-package hydra
:pin "melpa-stable") :pin "melpa-stable")