From 9aff9cffd990a1d1ba4e243be14c86c44b710886 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Wed, 6 Jan 2021 16:20:48 +0100 Subject: [PATCH] update smartparens and dash --- bba.org | 4 +- elpa/dash-20210101.1712/dash-pkg.el | 9 - .../dash-autoloads.el | 0 elpa/dash-20210105.414/dash-pkg.el | 12 + .../dash.el | 125 +- .../dash.info | 2112 +++++++++++++---- .../dir | 2 +- .../smartparens-pkg.el | 6 - .../smartparens-autoloads.el | 73 +- .../smartparens-c.el | 2 +- .../smartparens-clojure.el | 0 .../smartparens-config.el | 4 +- .../smartparens-crystal.el | 0 .../smartparens-elixir.el | 0 .../smartparens-ess.el | 24 +- .../smartparens-haskell.el | 0 .../smartparens-html.el | 0 .../smartparens-javascript.el | 0 .../smartparens-latex.el | 0 .../smartparens-lua.el | 0 .../smartparens-markdown.el | 0 .../smartparens-ml.el | 0 .../smartparens-org.el | 0 .../smartparens-pkg.el | 13 + .../smartparens-python.el | 26 +- .../smartparens-racket.el | 0 .../smartparens-rst.el | 6 +- .../smartparens-ruby.el | 3 +- .../smartparens-rust.el | 0 .../smartparens-scala.el | 0 .../smartparens-text.el | 0 .../smartparens.el | 247 +- .../sp-sublimetext-like.el | 57 + 33 files changed, 2097 insertions(+), 628 deletions(-) delete mode 100644 elpa/dash-20210101.1712/dash-pkg.el rename elpa/{dash-20210101.1712 => dash-20210105.414}/dash-autoloads.el (100%) create mode 100644 elpa/dash-20210105.414/dash-pkg.el rename elpa/{dash-20210101.1712 => dash-20210105.414}/dash.el (97%) rename elpa/{dash-20210101.1712 => dash-20210105.414}/dash.info (56%) rename elpa/{dash-20210101.1712 => dash-20210105.414}/dir (99%) delete mode 100644 elpa/smartparens-20200105.1259/smartparens-pkg.el rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-autoloads.el (83%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-c.el (96%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-clojure.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-config.el (97%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-crystal.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-elixir.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-ess.el (92%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-haskell.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-html.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-javascript.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-latex.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-lua.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-markdown.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-ml.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-org.el (100%) create mode 100644 elpa/smartparens-20201229.1937/smartparens-pkg.el rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-python.el (76%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-racket.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-rst.el (90%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-ruby.el (99%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-rust.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-scala.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens-text.el (100%) rename elpa/{smartparens-20200105.1259 => smartparens-20201229.1937}/smartparens.el (97%) create mode 100644 elpa/smartparens-20201229.1937/sp-sublimetext-like.el diff --git a/bba.org b/bba.org index 5efbe17a..baf6f79a 100644 --- a/bba.org +++ b/bba.org @@ -404,8 +404,8 @@ Some key bindings taken from [[https://ebzzry.github.io/emacs-pairs.html][emacs- #+BEGIN_SRC emacs-lisp :tangle yes (if (>= emacs-major-version 24) (progn - (add-to-list 'load-path "~/.emacs.d/elpa/smartparens-20200105.1259") - (add-to-list 'load-path "~/.emacs.d/elpa/dash-20210101.1712") + (add-to-list 'load-path "~/.emacs.d/elpa/smartparens-20201229.1937") + (add-to-list 'load-path "~/.emacs.d/elpa/dash-20210105.414") (require 'smartparens) (smartparens-global-mode 1) (defmacro def-pairs (pairs) diff --git a/elpa/dash-20210101.1712/dash-pkg.el b/elpa/dash-20210101.1712/dash-pkg.el deleted file mode 100644 index cc822c6c..00000000 --- a/elpa/dash-20210101.1712/dash-pkg.el +++ /dev/null @@ -1,9 +0,0 @@ -(define-package "dash" "20210101.1712" "A modern list library for Emacs" 'nil :commit "e8ed3d640797a8b816d1d5e2710a960765ab034b" :authors - (("Magnar Sveen" . "magnars@gmail.com")) - :maintainer - ("Magnar Sveen" . "magnars@gmail.com") - :keywords - ("extensions" "lisp")) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/dash-20210101.1712/dash-autoloads.el b/elpa/dash-20210105.414/dash-autoloads.el similarity index 100% rename from elpa/dash-20210101.1712/dash-autoloads.el rename to elpa/dash-20210105.414/dash-autoloads.el diff --git a/elpa/dash-20210105.414/dash-pkg.el b/elpa/dash-20210105.414/dash-pkg.el new file mode 100644 index 00000000..230a6df8 --- /dev/null +++ b/elpa/dash-20210105.414/dash-pkg.el @@ -0,0 +1,12 @@ +(define-package "dash" "20210105.414" "A modern list library for Emacs" + '((emacs "24")) + :commit "8879c41d30211ae2e72298e354fdffef627a3836" :authors + '(("Magnar Sveen" . "magnars@gmail.com")) + :maintainer + '("Magnar Sveen" . "magnars@gmail.com") + :keywords + '("extensions" "lisp") + :url "https://github.com/magnars/dash.el") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/dash-20210101.1712/dash.el b/elpa/dash-20210105.414/dash.el similarity index 97% rename from elpa/dash-20210101.1712/dash.el rename to elpa/dash-20210105.414/dash.el index 3c07f3b1..6548f8d4 100644 --- a/elpa/dash-20210101.1712/dash.el +++ b/elpa/dash-20210105.414/dash.el @@ -1,10 +1,12 @@ ;;; dash.el --- A modern list library for Emacs -*- lexical-binding: t -*- -;; Copyright (C) 2012-2016 Free Software Foundation, Inc. +;; Copyright (C) 2012-2021 Free Software Foundation, Inc. ;; Author: Magnar Sveen ;; Version: 2.17.0 +;; Package-Requires: ((emacs "24")) ;; Keywords: extensions, lisp +;; Homepage: https://github.com/magnars/dash.el ;; 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 @@ -21,15 +23,9 @@ ;;; Commentary: -;; A modern list api for Emacs. -;; -;; See documentation on https://github.com/magnars/dash.el#functions -;; -;; **Please note** The lexical binding in this file is not utilised at the -;; moment. We will take full advantage of lexical binding in an upcoming 3.0 -;; release of Dash. In the meantime, we've added the pragma to avoid a bug that -;; you can read more about in https://github.com/magnars/dash.el/issues/130. +;; A modern list API for Emacs. ;; +;; See its overview at https://github.com/magnars/dash.el#functions. ;;; Code: @@ -66,24 +62,23 @@ (setq it-index (1+ it-index)) (!cdr ,l))))) -(defmacro -doto (eval-initial-value &rest forms) - "Eval a form, then insert that form as the 2nd argument to other forms. -The EVAL-INITIAL-VALUE form is evaluated once. Its result is -passed to FORMS, which are then evaluated sequentially. Returns -the target form." +(defmacro -doto (init &rest forms) + "Evaluate INIT and thread the result as the 2nd argument to other FORMS. +INIT is evaluated once. Its result is passed to FORMS, which are +then evaluated sequentially. Returns the target form." (declare (indent 1)) (let ((retval (make-symbol "value"))) - `(let ((,retval ,eval-initial-value)) + `(let ((,retval ,init)) ,@(mapcar (lambda (form) - (if (sequencep form) - `(,(-first-item form) ,retval ,@(cdr form)) + (if (listp form) + `(,(car form) ,retval ,@(cdr form)) `(funcall form ,retval))) forms) ,retval))) (defmacro --doto (eval-initial-value &rest forms) "Anaphoric form of `-doto'. -Note: `it' is not required in each form." +Note: `it' need not be used in each form." (declare (indent 1)) `(let ((it ,eval-initial-value)) ,@forms @@ -170,18 +165,28 @@ Return nil, used for side-effects only." (--each-r-while list (funcall pred it) (funcall fn it))) (defmacro --dotimes (num &rest body) - "Repeatedly executes BODY (presumably for side-effects) with symbol `it' bound to integers from 0 through NUM-1." - (declare (debug (form body)) - (indent 1)) - (let ((n (make-symbol "num"))) + "Evaluate BODY NUM times, presumably for side-effects. +BODY is evaluated with the local variable `it' temporarily bound +to successive integers running from 0, inclusive, to NUM, +exclusive. BODY is not evaluated if NUM is less than 1. + +This is the anaphoric version of `-dotimes'." + (declare (debug (form body)) (indent 1)) + (let ((n (make-symbol "num")) + (i (make-symbol "i"))) `(let ((,n ,num) - (it 0)) - (while (< it ,n) - ,@body - (setq it (1+ it)))))) + (,i 0) + it) + (ignore it) + (while (< ,i ,n) + (setq it ,i ,i (1+ ,i)) + ,@body)))) (defun -dotimes (num fn) - "Repeatedly calls FN (presumably for side-effects) passing in integers from 0 through NUM-1." + "Call FN NUM times, presumably for side-effects. +FN is called with a single argument on successive integers +running from 0, inclusive, to NUM, exclusive. FN is not called +if NUM is less than 1." (declare (indent 1)) (--dotimes num (funcall fn it))) @@ -516,6 +521,26 @@ See also: `-map-last'" Thus function FN should return a list." (--mapcat (funcall fn it) list)) +(defmacro --iterate (form init n) + "Anaphoric version of `-iterate'." + (declare (debug (form form form))) + (let ((res (make-symbol "result"))) + `(let ((it ,init) ,res) + (dotimes (_ ,n) + (push it ,res) + (setq it ,form)) + (nreverse ,res)))) + +(defun -iterate (fun init n) + "Return a list of iterated applications of FUN to INIT. + +This means a list of the form: + + (INIT (FUN INIT) (FUN (FUN INIT)) ...) + +N is the length of the returned list." + (--iterate (funcall fun it) init n)) + (defun -flatten (l) "Take a nested list L and return its contents as a single, flat list. @@ -533,11 +558,6 @@ See also: `-flatten-n'" (-mapcat '-flatten l) (list l))) -(defmacro --iterate (form init n) - "Anaphoric version of `-iterate'." - (declare (debug (form form form))) - `(-iterate (lambda (it) ,form) ,init ,n)) - (defun -flatten-n (num list) "Flatten NUM levels of a nested LIST. @@ -1714,17 +1734,6 @@ SOURCE is a proper or improper list." (t ;; Handle improper lists. Last matching place, no need for shift (dash--match match-form (dash--match-cons-get-cdr skip-cdr source)))))) -(defun dash--vector-tail (seq start) - "Return the tail of SEQ starting at START." - (cond - ((vectorp seq) - (let* ((re-length (- (length seq) start)) - (re (make-vector re-length 0))) - (--dotimes re-length (aset re it (aref seq (+ it start)))) - re)) - ((stringp seq) - (substring seq start)))) - (defun dash--match-vector (match-form source) "Setup a vector matching environment and call the real matcher." (let ((s (dash--match-make-source-symbol))) @@ -1772,7 +1781,7 @@ is discarded." (eq m '&rest)) (prog1 (dash--match (aref match-form (1+ i)) - `(dash--vector-tail ,source ,i)) + `(substring ,source ,i)) (setq i l))) ((and (symbolp m) ;; do not match symbols starting with _ @@ -1923,7 +1932,7 @@ Key-value stores are disambiguated by placing a token &plist, (eq '&as (aref match-form 1))) (let ((s (aref match-form 0))) (cons (list s source) - (dash--match (dash--vector-tail match-form 2) s)))) + (dash--match (substring match-form 2) s)))) (t (dash--match-vector match-form source)))))) (defun dash--normalize-let-varlist (varlist) @@ -1975,11 +1984,11 @@ If VARLIST only contains one (PATTERN SOURCE) element, you can optionally specify it using a vector and discarding the outer-most parens. Thus - (-let ((PATTERN SOURCE)) ..) + (-let ((PATTERN SOURCE)) ...) becomes - (-let [PATTERN SOURCE] ..). + (-let [PATTERN SOURCE] ...). `-let' uses a convention of not binding places (symbols) starting with _ whenever it's possible. You can use this to skip over @@ -2004,7 +2013,7 @@ Conses and lists: (a b) - bind car of list to A and `cadr' to B - (a1 a2 a3 ...) - bind 0th car of list to A1, 1st to A2, 2nd to A3 ... + (a1 a2 a3 ...) - bind 0th car of list to A1, 1st to A2, 2nd to A3... (a1 a2 a3 ... aN . rest) - as above, but bind the Nth cdr to REST. @@ -2477,12 +2486,10 @@ not, return a list with ARGS as elements." (if (listp arg) arg args))) (defun -repeat (n x) - "Return a list with X repeated N times. + "Return a new list of length N with each element being X. Return nil if N is less than 1." (declare (pure t) (side-effect-free t)) - (let (ret) - (--dotimes n (!cons x ret)) - ret)) + (and (natnump n) (make-list n x))) (defun -sum (list) "Return the sum of LIST." @@ -2552,20 +2559,6 @@ The items for the comparator form are exposed as \"it\" and \"other\"." (declare (debug (form form))) `(-min-by (lambda (it other) ,form) ,list)) -(defun -iterate (fun init n) - "Return a list of iterated applications of FUN to INIT. - -This means a list of form: - - (init (fun init) (fun (fun init)) ...) - -N is the length of the returned list." - (if (= n 0) nil - (let ((r (list init))) - (--dotimes (1- n) - (push (funcall fun (car r)) r)) - (nreverse r)))) - (defun -fix (fn list) "Compute the (least) fixpoint of FN with initial input LIST. diff --git a/elpa/dash-20210101.1712/dash.info b/elpa/dash-20210105.414/dash.info similarity index 56% rename from elpa/dash-20210101.1712/dash.info rename to elpa/dash-20210105.414/dash.info index ab669ce9..a0c99c25 100644 --- a/elpa/dash-20210101.1712/dash.info +++ b/elpa/dash-20210105.414/dash.info @@ -1,64 +1,57 @@ This is dash.info, produced by makeinfo version 6.5 from dash.texi. -This manual is for ‘dash.el’ version 2.12.1. +This manual is for Dash version 2.17.0. - Copyright © 2012-2015 Magnar Sveen + Copyright © 2012–2021 Free Software Foundation, Inc. - 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 - . + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with the Invariant Sections being “GNU General Public + License,” and no Front-Cover Texts or Back-Cover Texts. A copy of + the license is included in the section entitled “GNU Free + Documentation License”. INFO-DIR-SECTION Emacs START-INFO-DIR-ENTRY -* Dash: (dash.info). A modern list library for GNU Emacs +* Dash: (dash.info). A modern list library for GNU Emacs. END-INFO-DIR-ENTRY  File: dash.info, Node: Top, Next: Installation, Up: (dir) -dash +Dash **** -This manual is for ‘dash.el’ version 2.12.1. +This manual is for Dash version 2.17.0. - Copyright © 2012-2015 Magnar Sveen + Copyright © 2012–2021 Free Software Foundation, Inc. - 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. + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with the Invariant Sections being “GNU General Public + License,” and no Front-Cover Texts or Back-Cover Texts. A copy of + the license is included in the section entitled “GNU Free + Documentation License”. - 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. +* Menu: - You should have received a copy of the GNU General Public License - along with this program. If not, see - . +* Installation:: Installing and configuring Dash. +* Functions:: Dash API reference. +* Development:: Contributing to Dash development. -* Menu: +Appendices -* Installation:: -* Functions:: -* Development:: -* Index:: +* FDL:: The license for this documentation. +* GPL:: Conditions for copying and changing Dash. +* Index:: Index including functions and macros. -— The Detailed Node Listing — + — The Detailed Node Listing — Installation -* Using in a package:: -* Fontification of special variables:: +* Using in a package:: Listing Dash as a package dependency. +* Fontification of special variables:: Font Lock of anaphoric macro variables. Functions @@ -81,9 +74,9 @@ Functions Development -* Contribute:: How to contribute -* Changes:: List of significant changes by version -* Contributors:: List of contributors +* Contribute:: How to contribute. +* Change log:: List of significant changes by version. +* Contributors:: List of contributors.  File: dash.info, Node: Installation, Next: Functions, Prev: Top, Up: Top @@ -91,22 +84,23 @@ File: dash.info, Node: Installation, Next: Functions, Prev: Top, Up: Top 1 Installation ************** -It’s available on GNU ELPA (https://elpa.gnu.org/) and MELPA -(https://melpa.org/); use ‘M-x package-install’: +Dash is available on GNU ELPA (https://elpa.gnu.org/) and MELPA +(https://melpa.org/), and can be installed with the standard command +‘package-install’ (*note (emacs)Package Installation::). -‘M-x package-install dash’ - Install the dash library. +‘M-x package-install dash ’ + Install the Dash library. -‘M-x package-install dash-functional’ - Optional, if you want the function combinators. +‘M-x package-install dash-functional ’ + Install an optional library of additional function combinators. - Alternatively, you can just dump dash.el or dash-functional.el in + Alternatively, you can just dump ‘dash.el’ or ‘dash-functional.el’ in your load path somewhere. * Menu: -* Using in a package:: -* Fontification of special variables:: +* Using in a package:: Listing Dash as a package dependency. +* Fontification of special variables:: Font Lock of anaphoric macro variables.  File: dash.info, Node: Using in a package, Next: Fontification of special variables, Up: Installation @@ -114,13 +108,15 @@ File: dash.info, Node: Using in a package, Next: Fontification of special vari 1.1 Using in a package ====================== -Add this to the big comment block at the top: +If you use Dash in your own package, be sure to list it as a dependency +in the library’s headers as follows (*note (elisp)Library Headers::). - ;; Package-Requires: ((dash "2.12.1")) + ;; Package-Requires: ((dash "2.17.0")) -To get function combinators: + The same goes for the ‘dash-functional.el’ library of function +combinators: - ;; Package-Requires: ((dash "2.12.1") (dash-functional "1.2.0") (emacs "24")) + ;; Package-Requires: ((dash "2.17.0") (dash-functional "1.2.0"))  File: dash.info, Node: Fontification of special variables, Prev: Using in a package, Up: Installation @@ -128,10 +124,11 @@ File: dash.info, Node: Fontification of special variables, Prev: Using in a pa 1.2 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 -‘dash-fontify-mode’. In older Emacs versions which do not dynamically -detect macros, the minor mode also fontifies Dash macro calls. +The autoloaded minor mode ‘dash-fontify-mode’ is provided for optional +fontification of anaphoric Dash variables (‘it’, ‘acc’, etc.) in Emacs +Lisp buffers using search-based Font Lock (*note (emacs)Font Lock::). +In older Emacs versions which do not dynamically detect macros, the +minor mode also fontifies calls to Dash macros. To automatically enable the minor mode in all Emacs Lisp buffers, just call its autoloaded global counterpart ‘global-dash-fontify-mode’, @@ -145,28 +142,36 @@ File: dash.info, Node: Functions, Next: Development, Prev: Installation, Up: 2 Functions *********** -This chapter contains reference documentation for the dash application -programming interface (API). All functions and constructs in the library -are prefixed with a dash (-). +This chapter contains reference documentation for the Dash API +(Application Programming Interface). The names of all public functions +defined in the library are prefixed with a dash character (‘-’). - There are also anaphoric versions of functions where that makes -sense, prefixed with two dashes instead of one. + The library also provides anaphoric macro versions of functions where +that makes sense. The names of these macros are prefixed with two +dashes (‘--’) instead of one. - For instance, while ‘-map’ takes a function to map over the list, one -can also use the anaphoric form with double dashes - which will then be -executed with ‘it’ exposed as the list item. Here’s an example: + For instance, while the function ‘-map’ applies a function to each +element of a list, its anaphoric counterpart ‘--map’ evaluates a form +with the local variable ‘it’ temporarily bound to the current list +element instead. - (-map (lambda (n) (* n n)) '(1 2 3 4)) ;; normal version + ;; Normal version. + (-map (lambda (n) (* n n)) '(1 2 3 4)) + ⇒ (1 4 9 16) - (--map (* it it) '(1 2 3 4)) ;; anaphoric version + ;; Anaphoric version. + (--map (* it it) '(1 2 3 4)) + ⇒ (1 4 9 16) -Of course, the original can also be written like + The normal version can, of course, also be written as in the +following example, which demonstrates the utility of both versions. - (defun square (n) (* n n)) + (defun my-square (n) + "Return N multiplied by itself." + (* n n)) - (-map 'square '(1 2 3 4)) - -which demonstrates the usefulness of both versions. + (-map #'my-square '(1 2 3 4)) + ⇒ (1 4 9 16) * Menu: @@ -1029,19 +1034,19 @@ File: dash.info, Node: Unfolding, Next: Predicates, Prev: Reductions, Up: Fu 2.5 Unfolding ============= -Operations dual to reductions, building lists from seed value rather +Operations dual to reductions, building lists from a seed value rather than consuming a list to produce a single value. -- Function: -iterate (fun init n) Return a list of iterated applications of FUN to INIT. - This means a list of form: + This means a list of the form: - (init (fun init) (fun (fun init)) ...) + (INIT (FUN INIT) (FUN (FUN INIT)) ...) N is the length of the returned list. - (-iterate '1+ 1 10) + (-iterate #'1+ 1 10) ⇒ '(1 2 3 4 5 6 7 8 9 10) (-iterate (lambda (x) (+ x x)) 2 5) ⇒ '(2 4 8 16 32) @@ -1576,8 +1581,8 @@ Other list functions not fit to be classified elsewhere. ⇒ '(6 7 1 2 3 4 5) -- Function: -repeat (n x) - Return a list with X repeated N times. Return nil if N is less - than 1. + Return a new list of length N with each element being X. Return + nil if N is less than 1. (-repeat 3 :a) ⇒ '(:a :a :a) @@ -2248,11 +2253,11 @@ control. optionally specify it using a vector and discarding the outer-most parens. Thus - (-let ((PATTERN SOURCE)) ..) + (-let ((PATTERN SOURCE)) ...) becomes - (-let [PATTERN SOURCE] ..). + (-let [PATTERN SOURCE] ...). ‘-let’ (*note -let::) uses a convention of not binding places (symbols) starting with _ whenever it’s possible. You can use this @@ -2277,37 +2282,36 @@ control. (a b) - bind car of list to A and ‘cadr’ to B - (a1 a2 a3 ...) - bind 0th car of list to A1, 1st to A2, 2nd to A3 - ... + (a1 a2 a3 ...) - bind 0th car of list to A1, 1st to A2, 2nd to + A3... - (a1 a2 a3 ... aN . rest) - as above, but bind the Nth cdr to - REST. + (a1 a2 a3 ... aN . rest) - as above, but bind the Nth cdr to REST. Vectors: [a] - bind 0th element of a non-list sequence to A (works with vectors, strings, bit arrays...) - [a1 a2 a3 ...] - bind 0th element of non-list sequence to A0, 1st + [a1 a2 a3 ...] - bind 0th element of non-list sequence to A0, 1st to A1, 2nd to A2, ... If the PATTERN is shorter than SOURCE, the values at places not in PATTERN are ignored. If the PATTERN is longer than SOURCE, an ‘error’ is thrown. - [a1 a2 a3 ... &rest rest] - as above, but bind the rest of the + [a1 a2 a3 ... &rest rest] - as above, but bind the rest of the sequence to REST. This is conceptually the same as improper list - matching (a1 a2 ... aN . rest) + matching (a1 a2 ... aN . rest) Key/value stores: - (&plist key0 a0 ... keyN aN) - bind value mapped by keyK in the + (&plist key0 a0 ... keyN aN) - bind value mapped by keyK in the SOURCE plist to aK. If the value is not found, aK is nil. Uses ‘plist-get’ to fetch values. - (&alist key0 a0 ... keyN aN) - bind value mapped by keyK in the + (&alist key0 a0 ... keyN aN) - bind value mapped by keyK in the SOURCE alist to aK. If the value is not found, aK is nil. Uses ‘assoc’ to fetch values. - (&hash key0 a0 ... keyN aN) - bind value mapped by keyK in the + (&hash key0 a0 ... keyN aN) - bind value mapped by keyK in the SOURCE hash table to aK. If the value is not found, aK is nil. Uses ‘gethash’ to fetch values. @@ -2315,10 +2319,10 @@ control. plist-like key-value pairs, similarly to &keys keyword of ‘cl-defun’. - (a1 a2 ... aN &keys key1 b1 ... keyN bK) + (a1 a2 ... aN &keys key1 b1 ... keyN bK) - This binds N values from the list to a1 ... aN, then interprets - the cdr as a plist (see key/value matching above). + This binds N values from the list to a1 ... aN, then interprets the + cdr as a plist (see key/value matching above). A shorthand notation for kv-destructuring exists which allows the patterns be optionally left out and derived from the key name in @@ -2426,7 +2430,7 @@ control. Note that you have to enclose the MATCH-FORM in a pair of parens, such that: - (-lambda (x) body) (-lambda (x y ...) body) + (-lambda (x) body) (-lambda (x y ...) body) has the usual semantics of ‘lambda’. Furthermore, these get translated into normal lambda, so there is no performance penalty. @@ -2532,31 +2536,28 @@ Functions iterating over lists for side-effect only. ⇒ '(3 4) -- Function: -dotimes (num fn) - Repeatedly calls FN (presumably for side-effects) passing in - integers from 0 through NUM-1. + Call FN NUM times, presumably for side-effects. FN is called with + a single argument on successive integers running from 0, inclusive, + to NUM, exclusive. FN is not called if NUM is less than 1. - (let (s) (-dotimes 3 (lambda (n) (!cons n s))) s) + (let (s) (-dotimes 3 (lambda (n) (push n s))) s) ⇒ '(2 1 0) - (let (s) (--dotimes 5 (!cons it s)) s) + (let (s) (-dotimes 0 (lambda (n) (push n s))) s) + ⇒ nil + (let (s) (--dotimes 5 (push it s)) s) ⇒ '(4 3 2 1 0) - -- Macro: -doto (eval-initial-value &rest forms) - Eval a form, then insert that form as the 2nd argument to other - forms. The EVAL-INITIAL-VALUE form is evaluated once. Its result - is passed to FORMS, which are then evaluated sequentially. Returns - the target form. + -- Macro: -doto (init &rest forms) + Evaluate INIT and thread the result as the 2nd argument to other + FORMS. INIT is evaluated once. Its result is passed to FORMS, + which are then evaluated sequentially. Returns the target form. - (-doto '(1 2 3) (!cdr) (!cdr)) + (-doto (list 1 2 3) (pop) (pop)) ⇒ '(3) - (-doto '(1 . 2) (setcar 3) (setcdr 4)) + (-doto (cons 1 2) (setcar 3) (setcdr 4)) ⇒ '(3 . 4) - - -- Macro: --doto (eval-initial-value &rest forms) - Anaphoric form of ‘-doto’ (*note -doto::). Note: ‘it’ is not - required in each form. - - (gethash "key" (--doto (make-hash-table :test 'equal) (puthash "key" "value" it))) - ⇒ "value" + (gethash 'k (--doto (make-hash-table) (puthash 'k 'v it))) + ⇒ 'v  File: dash.info, Node: Destructive operations, Next: Function combinators, Prev: Side-effects, Up: Functions @@ -2798,12 +2799,12 @@ offered in a separate package: ‘dash-functional‘. This function satisfies the following laws: - (-compose (-prodfn f g ...) (-prodfn f’ g’ ...)) = (-prodfn - (-compose f f’) (-compose g g’) ...) (-prodfn f g ...) = (-juxt + (-compose (-prodfn f g ...) (-prodfn f’ g’ ...)) = (-prodfn + (-compose f f’) (-compose g g’) ...) (-prodfn f g ...) = (-juxt (-compose f (-partial ’nth 0)) (-compose g (-partial ’nth 1)) ...) - (-compose (-prodfn f g ...) (-juxt f’ g’ ...)) = (-juxt (-compose - f f’) (-compose g g’) ...) (-compose (-partial ’nth n) (-prod f1 - f2 ...)) = (-compose fn (-partial ’nth n)) + (-compose (-prodfn f g ...) (-juxt f’ g’ ...)) = (-juxt (-compose f + f’) (-compose g g’) ...) (-compose (-partial ’nth n) (-prod f1 f2 + ...)) = (-compose fn (-partial ’nth n)) (funcall (-prodfn '1+ '1- 'number-to-string) '(1 2 3)) ⇒ '(2 1 "3") @@ -2813,153 +2814,250 @@ offered in a separate package: ‘dash-functional‘. ⇒ 18  -File: dash.info, Node: Development, Next: Index, Prev: Functions, Up: Top +File: dash.info, Node: Development, Next: FDL, Prev: Functions, Up: Top 3 Development ************* -The dash repository is hosted on GitHub: - +The Dash repository is hosted on GitHub at +. * Menu: -* Contribute:: How to contribute -* Changes:: List of significant changes by version -* Contributors:: List of contributors +* Contribute:: How to contribute. +* Change log:: List of significant changes by version. +* Contributors:: List of contributors.  -File: dash.info, Node: Contribute, Next: Changes, Up: Development +File: dash.info, Node: Contribute, Next: Change log, Up: Development 3.1 Contribute ============== Yes, please do. Pure functions in the list manipulation realm only, -please. There’s a suite of tests in dev/examples.el, so remember to add -tests for your function, or it might get broken later. +please. There’s a suite of examples/tests in ‘dev/examples.el’, so +remember to add tests for your additions, or they may get broken later. - Run the tests with ‘./run-tests.sh’. Create the docs with -‘./create-docs.sh’. I highly recommend that you install these as a + Run the tests with ‘make check’. Regenerate the docs with ‘make +docs’. Contributors are encouraged to install these commands as a Git pre-commit hook, so that the tests are always running and the docs are always in sync: -cp pre-commit.sh .git/hooks/pre-commit + $ cp pre-commit.sh .git/hooks/pre-commit - Oh, and don’t edit ‘README.md’ directly, it is auto-generated. -Change ‘readme-template.md’ or ‘examples-to-docs.el’ instead. The same -goes for the info manual. + Oh, and don’t edit ‘README.md’ or ‘dash.texi’ directly, as they are +auto-generated. Instead, change their respective templates +‘readme-template.md’ or ‘dash-template.texi’. + + To ensure that Dash can be distributed with GNU ELPA or Emacs, we +require that all contributors assign copyright to the Free Software +Foundation. For more on this, *note (emacs)Copyright Assignment::.  -File: dash.info, Node: Changes, Next: Contributors, Prev: Contribute, Up: Development +File: dash.info, Node: Change log, Next: Contributors, Prev: Contribute, Up: Development + +3.2 Change log +============== -3.2 Changes -=========== +Changes in 2.17: + + • Sped up ‘-uniq’ by using hash-tables when possible (Zhu + Zihao). + • Fixed ‘-inits’ to be non-destructive (Zach Shaftel). + • Fixed indent rules for ‘-some->’ and family (Wouter + Bolsterlee). + • Added ‘-zip-lists’ which always returns a list of proper + lists, even for two input lists (see issue #135). + +Changes in 2.16: + + • Added ‘--doto’, anaphoric version of ‘-doto’. + • Aliased ‘-cons-pair-p’ to ‘-cons-pair?’. + • Generalized ‘-rotate’ for |N| greater than the length of the + list (Brian Leung). + • Added a mechanism to extend destructuring with custom matchers + (Ivan Yonchovski). + +Changes in 2.15: + + This release brought new destructuring features, some new control + flow functions, and performance optimizations. + + • Added ‘-setq’ with destructuring binding support similar to + the ‘-let’ family. + • Added smarter key destructuring in ‘-let’ and friends where + variables are auto-derived from keys. + • Allowed ‘-let’ bindings without a source value form. + • Added ‘-each-r’ and ‘-each-r-while’ (Paul Pogonyshev). + • Added ‘-common-suffix’ (Basil L. Contovounesios). + • Improved performance of folds (‘-reduce’ and friends) (Basil + L. Contovounesios). + +Changes in 2.14: + + This release retired support for Emacs 23. + + • Added Edebug support for threading macros (Wilfred Hughes). + • Added ‘-unzip’. + • Added support for ‘-first-item’ and ‘-last-item’ as place + forms (*note (elisp)Generalized Variables::). + • Added ‘-powerset’ and ‘-permutations’ (Mark Oteiza). + • Added ‘-as->’ for threading a named variable (Zachary Kanfer). + • Added ‘-partition-after-pred’, ‘-partition-before-pred’, + ‘-partition-after-item’, and ‘-partition-before-item’ (Zachary + Kanfer). + • Fixed a bug in ‘-any-p’ and friends testing for ‘null’ on + lists containing ‘nil’. + • Fixed infinite loop bug in ‘-zip’ and ‘-interleave’ when + called with empty input. + • Added ‘-second-item’ through ‘-fifth-item’ as alternatives to + ‘nth’ (Wilfred Hughes). + • 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 L. Contovounesios). + +Changes in 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. + • Added ‘-select-column’ and ‘-select-columns’. + • Fixed ‘-map-last’ and ‘--remove-last’ to be non-destructive. + • 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). + +Changes in 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. + +Changes in 2.11: + + • Lots of clean up w.r.t. byte compilation, debug macros, and + tests. Changes in 2.10: - • Add ‘-let’ destructuring to ‘-if-let’ and ‘-when-let’ (Fredrik - Bergroth) + • Added ‘-let’ destructuring to ‘-if-let’ and ‘-when-let’ + (Fredrik Bergroth). Changes in 2.9: - • Add ‘-let’, ‘-let*’ and ‘-lambda’ with destructuring - • Add ‘-tree-seq’ and ‘-tree-map-nodes’ - • Add ‘-non-nil’ - • Add ‘-fix’ - • Add ‘-fixfn’ (dash-functional 1.2) - • Add ‘-copy’ (Wilfred Hughes) + • 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). Changes in 2.8: - • Add ‘-butlast’ + • Added ‘-butlast’. Changes in 2.7: - • ‘-zip’ now supports more than two lists (Steve Lamb) - • Add ‘-cycle’, ‘-pad’, ‘-annotate’, ‘-zip-fill’ (Steve Lamb) - • Add ‘-table’, ‘-table-flat’ (finite cartesian product) - • Add ‘-flatten-n’ - • ‘-slice’ now supports "step" argument - • Add functional combinators ‘-iteratefn’, ‘-prodfn’ - • Add ‘-replace’, ‘-splice’, ‘-splice-list’ which generalize - ‘-replace-at’ and ‘-insert-at’ - • Add ‘-compose’, ‘-iteratefn’ and ‘-prodfn’ (dash-functional 1.1) + • ‘-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). Changes in 2.6: - • Add ‘-is-prefix-p’, ‘-is-suffix-p’, ‘-is-infix-p’ (Matus Goljer) - • Add ‘-iterate’, ‘-unfold’ (Matus Goljer) - • Add ‘-split-on’, ‘-split-when’ (Matus Goljer) - • Add ‘-find-last-index’ (Matus Goljer) - • Add ‘-list’ (Johan Andersson) + • 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). Changes in 2.5: - • Add ‘-same-items?’ (Johan Andersson) - • A few bugfixes + • Added ‘-same-items?’ (Johan Andersson). + • Various bugfixes. Changes in 2.4: - • Add ‘-snoc’ (Matus Goljer) - • Add ‘-replace-at’, ‘-update-at’, ‘-remove-at’, and - ‘-remove-at-indices’ (Matus Goljer) + • Added ‘-snoc’ (Matus Goljer). + • Added ‘-replace-at’, ‘-update-at’, ‘-remove-at’, and + ‘-remove-at-indices’ (Matus Goljer). Changes in 2.3: - • Add tree operations (Matus Goljer) - • Make font-lock optional + • Added tree operations (Matus Goljer). + • Made Font Lock optional. Changes in 2.2: - • Add ‘-compose’ (Christina Whyte) + • Added ‘-compose’ (Christina Whyte). Changes in 2.1: - • Add indexing operations (Matus Goljer) + • Added indexing operations (Matus Goljer). Changes in 2.0: - • Split out ‘dash-functional.el’ (Matus Goljer) - • Add ‘-andfn’, ‘-orfn’, ‘-not’, ‘-cut’, ‘-const’, ‘-flip’ and ‘-on’. - (Matus Goljer) - • Fix ‘-min’, ‘-max’, ‘-min-by’ and ‘-max-by’ (Matus Goljer) + • 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). Changes in 1.8: - • Add ‘-first-item’ and ‘-last-item’ (Wilfred Hughes) + • Added ‘-first-item’ and ‘-last-item’ (Wilfred Hughes). Changes in 1.7: - • Add ‘-rotate’ (Matus Goljer) + • Added ‘-rotate’ (Matus Goljer). Changes in 1.6: - • Add ‘-min’, ‘-max’, ‘-min-by’ and ‘-max-by’ (Johan Andersson) + • Added ‘-min’, ‘-max’, ‘-min-by’, and ‘-max-by’ (Johan + Andersson). Changes in 1.5: - • Add ‘-sum’ and ‘-product’ (Johan Andersson) + • Added ‘-sum’ and ‘-product’ (Johan Andersson). Changes in 1.4: - • Add ‘-sort’ - • Add ‘-reduce-r’ (Matus Goljer) - • Add ‘-reduce-r-from’ (Matus Goljer) + • Added ‘-sort’. + • Added ‘-reduce-r’ (Matus Goljer). + • Added ‘-reduce-r-from’ (Matus Goljer). Changes in 1.3: - • Add ‘-partition-in-steps’ - • Add ‘-partition-all-in-steps’ + • Added ‘-partition-in-steps’. + • Added ‘-partition-all-in-steps’. Changes in 1.2: - • Add ‘-last’ (Matus Goljer) - • Add ‘-insert-at’ (Emanuel Evans) - • Add ‘-when-let’ and ‘-if-let’ (Emanuel Evans) - • Add ‘-when-let*’ and ‘-if-let*’ (Emanuel Evans) - • Some bugfixes + • 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.  -File: dash.info, Node: Contributors, Prev: Changes, Up: Development +File: dash.info, Node: Contributors, Prev: Change log, Up: Development 3.3 Contributors ================ @@ -2972,29 +3070,1235 @@ File: dash.info, Node: Contributors, Prev: Changes, Up: Development ‘-repeat’. • Nic Ferrier (https://github.com/nicferrier) contributed ‘-cons*’. • Wilfred Hughes (https://github.com/Wilfred) contributed ‘-slice’, - ‘-first-item’ and ‘-last-item’. + ‘-first-item’, and ‘-last-item’. • Emanuel Evans (https://github.com/shosti) contributed ‘-if-let’, - ‘-when-let’ and ‘-insert-at’. + ‘-when-let’, and ‘-insert-at’. • Johan Andersson (https://github.com/rejeep) contributed ‘-sum’, - ‘-product’ and ‘-same-items?’ + ‘-product’, and ‘-same-items?’. • Christina Whyte (https://github.com/kurisuwhyte) contributed - ‘-compose’ + ‘-compose’. • Steve Lamb (https://github.com/steventlamb) contributed ‘-cycle’, - ‘-pad’, ‘-annotate’, ‘-zip-fill’ and an n-ary version of ‘-zip’. + ‘-pad’, ‘-annotate’, ‘-zip-fill’, and a variadic version of ‘-zip’. • Fredrik Bergroth (https://github.com/fbergroth) made the ‘-if-let’ - family use ‘-let’ destructuring and improved script for generating - documentation. + family use ‘-let’ destructuring and improved the script for + generating documentation. • Mark Oteiza (https://github.com/holomorph) contributed the script - to create an info manual. + to create an Info manual. • Vasilij Schneidermann (https://github.com/wasamasa) contributed ‘-some’. • William West (https://github.com/occidens) made ‘-fixfn’ more robust at handling floats. + • Cam Saul (https://github.com/camsaul) contributed ‘-some->’, + ‘-some->>’, and ‘-some-->’. + • Basil L. Contovounesios (https://github.com/basil-conto) + contributed ‘-common-prefix’. + • Paul Pogonyshev (https://github.com/doublep) contributed ‘-each-r’ + and ‘-each-r-while’. Thanks! + New contributors are very welcome. *Note Contribute::. + + +File: dash.info, Node: FDL, Next: GPL, Prev: Development, Up: Top + +Appendix A GNU Free Documentation License +***************************************** + + Version 1.3, 3 November 2008 + + Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document “free” in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of “copyleft”, which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. We + recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it can + be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + “Document”, below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as “you”. You accept + the license if you copy, modify or distribute the work in a way + requiring permission under copyright law. + + A “Modified Version” of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A “Secondary Section” is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document’s overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The “Invariant Sections” are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this License. + If a section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document may + contain zero Invariant Sections. If the Document does not identify + any Invariant Sections then there are none. + + The “Cover Texts” are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A “Transparent” copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed + of pixels) generic paint programs or (for drawings) some widely + available drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of formats + suitable for input to text formatters. A copy made in an otherwise + Transparent file format whose markup, or absence of markup, has + been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if + used for any substantial amount of text. A copy that is not + “Transparent” is called “Opaque”. + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and standard-conforming + simple HTML, PostScript or PDF designed for human modification. + Examples of transparent image formats include PNG, XCF and JPG. + Opaque formats include proprietary formats that can be read and + edited only by proprietary word processors, SGML or XML for which + the DTD and/or processing tools are not generally available, and + the machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + + The “Title Page” means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, “Title + Page” means the text near the most prominent appearance of the + work’s title, preceding the beginning of the body of the text. + + The “publisher” means any person or entity that distributes copies + of the Document to the public. + + A section “Entitled XYZ” means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) + To “Preserve the Title” of such a section when you modify the + Document means that it remains a section “Entitled XYZ” according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow the + conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document’s license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the title + equally prominent and visible. You may add other material on the + covers in addition. Copying with changes limited to the covers, as + long as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a machine-readable + Transparent copy along with each Opaque copy, or state in or with + each Opaque copy a computer-network location from which the general + network-using public has access to download using public-standard + network protocols a complete Transparent copy of the Document, free + of added material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of copies, + to give them a chance to provide you with an updated version of the + Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus licensing + distribution and modification of the Modified Version to whoever + possesses a copy of it. In addition, you must do these things in + the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that + version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document’s + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled “History”, Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on the + Title Page. If there is no section Entitled “History” in the + Document, create one stating the title, year, authors, and + publisher of the Document as given on its Title Page, then add + an item describing the Modified Version as stated in the + previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in the + “History” section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. + + K. For any section Entitled “Acknowledgements” or “Dedications”, + Preserve the Title of the section, and preserve in the section + all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, unaltered + in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + + M. Delete any section Entitled “Endorsements”. Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + “Endorsements” or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option designate + some or all of these sections as invariant. To do this, add their + titles to the list of Invariant Sections in the Modified Version’s + license notice. These titles must be distinct from any other + section titles. + + You may add a section Entitled “Endorsements”, provided it contains + nothing but endorsements of your Modified Version by various + parties—for example, statements of peer review or that the text has + been approved by an organization as the authoritative definition of + a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts in the Modified Version. Only one passage + of Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document + already includes a cover text for the same cover, previously added + by you or by arrangement made by the same entity you are acting on + behalf of, you may not add another; but you may replace the old + one, on explicit permission from the previous publisher that added + the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination all + of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + “History” in the various original documents, forming one section + Entitled “History”; likewise combine any sections Entitled + “Acknowledgements”, and any sections Entitled “Dedications”. You + must delete all sections Entitled “Endorsements.” + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the documents + in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of a + storage or distribution medium, is called an “aggregate” if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation’s users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document’s Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled “Acknowledgements”, + “Dedications”, or “History”, the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from you + under this License. If your rights have been terminated and not + permanently reinstated, receipt of a copy of some or all of the + same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + . + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License “or any later version” applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If the + Document does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. If the Document specifies that a proxy can + decide which future versions of this License can be used, that + proxy’s public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A “Massive Multiauthor Collaboration” (or “MMC”) contained in the + site means any set of copyrightable works thus published on the MMC + site. + + “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + “Incorporate” means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is “eligible for relicensing” if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the “with...Texts.” line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of free +software license, such as the GNU General Public License, to permit +their use in free software. + + +File: dash.info, Node: GPL, Next: Index, Prev: FDL, Up: Top + +Appendix B GNU General Public License +************************************* + + Version 3, 29 June 2007 + + Copyright © 2007 Free Software Foundation, Inc. + + Everyone is permitted to copy and distribute verbatim copies of this + license document, but changing it is not allowed. + +Preamble +======== + +The GNU General Public License is a free, copyleft license for software +and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program—to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers’ and authors’ protection, the GPL clearly explains +that there is no warranty for this free software. For both users’ and +authors’ sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users’ freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + +TERMS AND CONDITIONS +==================== + + 0. Definitions. + + “This License” refers to version 3 of the GNU General Public + License. + + “Copyright” also means copyright-like laws that apply to other + kinds of works, such as semiconductor masks. + + “The Program” refers to any copyrightable work licensed under this + License. Each licensee is addressed as “you”. “Licensees” and + “recipients” may be individuals or organizations. + + To “modify” a work means to copy from or adapt all or part of the + work in a fashion requiring copyright permission, other than the + making of an exact copy. The resulting work is called a “modified + version” of the earlier work or a work “based on” the earlier work. + + A “covered work” means either the unmodified Program or a work + based on the Program. + + To “propagate” a work means to do anything with it that, without + permission, would make you directly or secondarily liable for + infringement under applicable copyright law, except executing it on + a computer or modifying a private copy. Propagation includes + copying, distribution (with or without modification), making + available to the public, and in some countries other activities as + well. + + To “convey” a work means any kind of propagation that enables other + parties to make or receive copies. Mere interaction with a user + through a computer network, with no transfer of a copy, is not + conveying. + + An interactive user interface displays “Appropriate Legal Notices” + to the extent that it includes a convenient and prominently visible + feature that (1) displays an appropriate copyright notice, and (2) + tells the user that there is no warranty for the work (except to + the extent that warranties are provided), that licensees may convey + the work under this License, and how to view a copy of this + License. If the interface presents a list of user commands or + options, such as a menu, a prominent item in the list meets this + criterion. + + 1. Source Code. + + The “source code” for a work means the preferred form of the work + for making modifications to it. “Object code” means any non-source + form of a work. + + A “Standard Interface” means an interface that either is an + official standard defined by a recognized standards body, or, in + the case of interfaces specified for a particular programming + language, one that is widely used among developers working in that + language. + + The “System Libraries” of an executable work include anything, + other than the work as a whole, that (a) is included in the normal + form of packaging a Major Component, but which is not part of that + Major Component, and (b) serves only to enable use of the work with + that Major Component, or to implement a Standard Interface for + which an implementation is available to the public in source code + form. A “Major Component”, in this context, means a major + essential component (kernel, window system, and so on) of the + specific operating system (if any) on which the executable work + runs, or a compiler used to produce the work, or an object code + interpreter used to run it. + + The “Corresponding Source” for a work in object code form means all + the source code needed to generate, install, and (for an executable + work) run the object code and to modify the work, including scripts + to control those activities. However, it does not include the + work’s System Libraries, or general-purpose tools or generally + available free programs which are used unmodified in performing + those activities but which are not part of the work. For example, + Corresponding Source includes interface definition files associated + with source files for the work, and the source code for shared + libraries and dynamically linked subprograms that the work is + specifically designed to require, such as by intimate data + communication or control flow between those subprograms and other + parts of the work. + + The Corresponding Source need not include anything that users can + regenerate automatically from other parts of the Corresponding + Source. + + The Corresponding Source for a work in source code form is that + same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of + copyright on the Program, and are irrevocable provided the stated + conditions are met. This License explicitly affirms your unlimited + permission to run the unmodified Program. The output from running + a covered work is covered by this License only if the output, given + its content, constitutes a covered work. This License acknowledges + your rights of fair use or other equivalent, as provided by + copyright law. + + You may make, run and propagate covered works that you do not + convey, without conditions so long as your license otherwise + remains in force. You may convey covered works to others for the + sole purpose of having them make modifications exclusively for you, + or provide you with facilities for running those works, provided + that you comply with the terms of this License in conveying all + material for which you do not control copyright. Those thus making + or running the covered works for you must do so exclusively on your + behalf, under your direction and control, on terms that prohibit + them from making any copies of your copyrighted material outside + their relationship with you. + + Conveying under any other circumstances is permitted solely under + the conditions stated below. Sublicensing is not allowed; section + 10 makes it unnecessary. + + 3. Protecting Users’ Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological + measure under any applicable law fulfilling obligations under + article 11 of the WIPO copyright treaty adopted on 20 December + 1996, or similar laws prohibiting or restricting circumvention of + such measures. + + When you convey a covered work, you waive any legal power to forbid + circumvention of technological measures to the extent such + circumvention is effected by exercising rights under this License + with respect to the covered work, and you disclaim any intention to + limit operation or modification of the work as a means of + enforcing, against the work’s users, your or third parties’ legal + rights to forbid circumvention of technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program’s source code as you + receive it, in any medium, provided that you conspicuously and + appropriately publish on each copy an appropriate copyright notice; + keep intact all notices stating that this License and any + non-permissive terms added in accord with section 7 apply to the + code; keep intact all notices of the absence of any warranty; and + give all recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, + and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to + produce it from the Program, in the form of source code under the + terms of section 4, provided that you also meet all of these + conditions: + + a. The work must carry prominent notices stating that you + modified it, and giving a relevant date. + + b. The work must carry prominent notices stating that it is + released under this License and any conditions added under + section 7. This requirement modifies the requirement in + section 4 to “keep intact all notices”. + + c. You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable + section 7 additional terms, to the whole of the work, and all + its parts, regardless of how they are packaged. This License + gives no permission to license the work in any other way, but + it does not invalidate such permission if you have separately + received it. + + d. If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has + interactive interfaces that do not display Appropriate Legal + Notices, your work need not make them do so. + + A compilation of a covered work with other separate and independent + works, which are not by their nature extensions of the covered + work, and which are not combined with it such as to form a larger + program, in or on a volume of a storage or distribution medium, is + called an “aggregate” if the compilation and its resulting + copyright are not used to limit the access or legal rights of the + compilation’s users beyond what the individual works permit. + Inclusion of a covered work in an aggregate does not cause this + License to apply to the other parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms + of sections 4 and 5, provided that you also convey the + machine-readable Corresponding Source under the terms of this + License, in one of these ways: + + a. Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b. Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that + product model, to give anyone who possesses the object code + either (1) a copy of the Corresponding Source for all the + software in the product that is covered by this License, on a + durable physical medium customarily used for software + interchange, for a price no more than your reasonable cost of + physically performing this conveying of source, or (2) access + to copy the Corresponding Source from a network server at no + charge. + + c. Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, + and only if you received the object code with such an offer, + in accord with subsection 6b. + + d. Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to + the Corresponding Source in the same way through the same + place at no further charge. You need not require recipients + to copy the Corresponding Source along with the object code. + If the place to copy the object code is a network server, the + Corresponding Source may be on a different server (operated by + you or a third party) that supports equivalent copying + facilities, provided you maintain clear directions next to the + object code saying where to find the Corresponding Source. + Regardless of what server hosts the Corresponding Source, you + remain obligated to ensure that it is available for as long as + needed to satisfy these requirements. + + e. Convey the object code using peer-to-peer transmission, + provided you inform other peers where the object code and + Corresponding Source of the work are being offered to the + general public at no charge under subsection 6d. + + A separable portion of the object code, whose source code is + excluded from the Corresponding Source as a System Library, need + not be included in conveying the object code work. + + A “User Product” is either (1) a “consumer product”, which means + any tangible personal property which is normally used for personal, + family, or household purposes, or (2) anything designed or sold for + incorporation into a dwelling. In determining whether a product is + a consumer product, doubtful cases shall be resolved in favor of + coverage. For a particular product received by a particular user, + “normally used” refers to a typical or common use of that class of + product, regardless of the status of the particular user or of the + way in which the particular user actually uses, or expects or is + expected to use, the product. A product is a consumer product + regardless of whether the product has substantial commercial, + industrial or non-consumer uses, unless such uses represent the + only significant mode of use of the product. + + “Installation Information” for a User Product means any methods, + procedures, authorization keys, or other information required to + install and execute modified versions of a covered work in that + User Product from a modified version of its Corresponding Source. + The information must suffice to ensure that the continued + functioning of the modified object code is in no case prevented or + interfered with solely because modification has been made. + + If you convey an object code work under this section in, or with, + or specifically for use in, a User Product, and the conveying + occurs as part of a transaction in which the right of possession + and use of the User Product is transferred to the recipient in + perpetuity or for a fixed term (regardless of how the transaction + is characterized), the Corresponding Source conveyed under this + section must be accompanied by the Installation Information. But + this requirement does not apply if neither you nor any third party + retains the ability to install modified object code on the User + Product (for example, the work has been installed in ROM). + + The requirement to provide Installation Information does not + include a requirement to continue to provide support service, + warranty, or updates for a work that has been modified or installed + by the recipient, or for the User Product in which it has been + modified or installed. Access to a network may be denied when the + modification itself materially and adversely affects the operation + of the network or violates the rules and protocols for + communication across the network. + + Corresponding Source conveyed, and Installation Information + provided, in accord with this section must be in a format that is + publicly documented (and with an implementation available to the + public in source code form), and must require no special password + or key for unpacking, reading or copying. + + 7. Additional Terms. + + “Additional permissions” are terms that supplement the terms of + this License by making exceptions from one or more of its + conditions. Additional permissions that are applicable to the + entire Program shall be treated as though they were included in + this License, to the extent that they are valid under applicable + law. If additional permissions apply only to part of the Program, + that part may be used separately under those permissions, but the + entire Program remains governed by this License without regard to + the additional permissions. + + When you convey a copy of a covered work, you may at your option + remove any additional permissions from that copy, or from any part + of it. (Additional permissions may be written to require their own + removal in certain cases when you modify the work.) You may place + additional permissions on material, added by you to a covered work, + for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material + you add to a covered work, you may (if authorized by the copyright + holders of that material) supplement the terms of this License with + terms: + + a. Disclaiming warranty or limiting liability differently from + the terms of sections 15 and 16 of this License; or + + b. Requiring preservation of specified reasonable legal notices + or author attributions in that material or in the Appropriate + Legal Notices displayed by works containing it; or + + c. Prohibiting misrepresentation of the origin of that material, + or requiring that modified versions of such material be marked + in reasonable ways as different from the original version; or + + d. Limiting the use for publicity purposes of names of licensors + or authors of the material; or + + e. Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f. Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified + versions of it) with contractual assumptions of liability to + the recipient, for any liability that these contractual + assumptions directly impose on those licensors and authors. + + All other non-permissive additional terms are considered “further + restrictions” within the meaning of section 10. If the Program as + you received it, or any part of it, contains a notice stating that + it is governed by this License along with a term that is a further + restriction, you may remove that term. If a license document + contains a further restriction but permits relicensing or conveying + under this License, you may add to a covered work material governed + by the terms of that license document, provided that the further + restriction does not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you + must place, in the relevant source files, a statement of the + additional terms that apply to those files, or a notice indicating + where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in + the form of a separately written license, or stated as exceptions; + the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly + provided under this License. Any attempt otherwise to propagate or + modify it is void, and will automatically terminate your rights + under this License (including any patent licenses granted under the + third paragraph of section 11). + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from you + under this License. If your rights have been terminated and not + permanently reinstated, you do not qualify to receive new licenses + for the same material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or + run a copy of the Program. Ancillary propagation of a covered work + occurring solely as a consequence of using peer-to-peer + transmission to receive a copy likewise does not require + acceptance. However, nothing other than this License grants you + permission to propagate or modify any covered work. These actions + infringe copyright if you do not accept this License. Therefore, + by modifying or propagating a covered work, you indicate your + acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically + receives a license from the original licensors, to run, modify and + propagate that work, subject to this License. You are not + responsible for enforcing compliance by third parties with this + License. + + An “entity transaction” is a transaction transferring control of an + organization, or substantially all assets of one, or subdividing an + organization, or merging organizations. If propagation of a + covered work results from an entity transaction, each party to that + transaction who receives a copy of the work also receives whatever + licenses to the work the party’s predecessor in interest had or + could give under the previous paragraph, plus a right to possession + of the Corresponding Source of the work from the predecessor in + interest, if the predecessor has it or can get it with reasonable + efforts. + + You may not impose any further restrictions on the exercise of the + rights granted or affirmed under this License. For example, you + may not impose a license fee, royalty, or other charge for exercise + of rights granted under this License, and you may not initiate + litigation (including a cross-claim or counterclaim in a lawsuit) + alleging that any patent claim is infringed by making, using, + selling, offering for sale, or importing the Program or any portion + of it. + + 11. Patents. + + A “contributor” is a copyright holder who authorizes use under this + License of the Program or a work on which the Program is based. + The work thus licensed is called the contributor’s “contributor + version”. + + A contributor’s “essential patent claims” are all patent claims + owned or controlled by the contributor, whether already acquired or + hereafter acquired, that would be infringed by some manner, + permitted by this License, of making, using, or selling its + contributor version, but do not include claims that would be + infringed only as a consequence of further modification of the + contributor version. For purposes of this definition, “control” + includes the right to grant patent sublicenses in a manner + consistent with the requirements of this License. + + Each contributor grants you a non-exclusive, worldwide, + royalty-free patent license under the contributor’s essential + patent claims, to make, use, sell, offer for sale, import and + otherwise run, modify and propagate the contents of its contributor + version. + + In the following three paragraphs, a “patent license” is any + express agreement or commitment, however denominated, not to + enforce a patent (such as an express permission to practice a + patent or covenant not to sue for patent infringement). To “grant” + such a patent license to a party means to make such an agreement or + commitment not to enforce a patent against the party. + + If you convey a covered work, knowingly relying on a patent + license, and the Corresponding Source of the work is not available + for anyone to copy, free of charge and under the terms of this + License, through a publicly available network server or other + readily accessible means, then you must either (1) cause the + Corresponding Source to be so available, or (2) arrange to deprive + yourself of the benefit of the patent license for this particular + work, or (3) arrange, in a manner consistent with the requirements + of this License, to extend the patent license to downstream + recipients. “Knowingly relying” means you have actual knowledge + that, but for the patent license, your conveying the covered work + in a country, or your recipient’s use of the covered work in a + country, would infringe one or more identifiable patents in that + country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or + arrangement, you convey, or propagate by procuring conveyance of, a + covered work, and grant a patent license to some of the parties + receiving the covered work authorizing them to use, propagate, + modify or convey a specific copy of the covered work, then the + patent license you grant is automatically extended to all + recipients of the covered work and works based on it. + + A patent license is “discriminatory” if it does not include within + the scope of its coverage, prohibits the exercise of, or is + conditioned on the non-exercise of one or more of the rights that + are specifically granted under this License. You may not convey a + covered work if you are a party to an arrangement with a third + party that is in the business of distributing software, under which + you make payment to the third party based on the extent of your + activity of conveying the work, and under which the third party + grants, to any of the parties who would receive the covered work + from you, a discriminatory patent license (a) in connection with + copies of the covered work conveyed by you (or copies made from + those copies), or (b) primarily for and in connection with specific + products or compilations that contain the covered work, unless you + entered into that arrangement, or that patent license was granted, + prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting + any implied license or other defenses to infringement that may + otherwise be available to you under applicable patent law. + + 12. No Surrender of Others’ Freedom. + + If conditions are imposed on you (whether by court order, agreement + or otherwise) that contradict the conditions of this License, they + do not excuse you from the conditions of this License. If you + cannot convey a covered work so as to satisfy simultaneously your + obligations under this License and any other pertinent obligations, + then as a consequence you may not convey it at all. For example, + if you agree to terms that obligate you to collect a royalty for + further conveying from those to whom you convey the Program, the + only way you could satisfy both those terms and this License would + be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have + permission to link or combine any covered work with a work licensed + under version 3 of the GNU Affero General Public License into a + single combined work, and to convey the resulting work. The terms + of this License will continue to apply to the part which is the + covered work, but the special requirements of the GNU Affero + General Public License, section 13, concerning interaction through + a network will apply to the combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new + versions of the GNU General Public License from time to time. Such + new versions will be similar in spirit to the present version, but + may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Program specifies that a certain numbered version of the GNU + General Public License “or any later version” applies to it, you + have the option of following the terms and conditions either of + that numbered version or of any later version published by the Free + Software Foundation. If the Program does not specify a version + number of the GNU General Public License, you may choose any + version ever published by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future + versions of the GNU General Public License can be used, that + proxy’s public statement of acceptance of a version permanently + authorizes you to choose that version for the Program. + + Later license versions may give you additional or different + permissions. However, no additional obligations are imposed on any + author or copyright holder as a result of your choosing to follow a + later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY + APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE + COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE + RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. + SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL + NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES + AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR + DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE + THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA + BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD + PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER + PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF + THE POSSIBILITY OF SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided + above cannot be given local legal effect according to their terms, + reviewing courts shall apply local law that most closely + approximates an absolute waiver of all civil liability in + connection with the Program, unless a warranty or assumption of + liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS +=========================== + +How to Apply These Terms to Your New Programs +============================================= + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least the +“copyright” line and a pointer to where the full notice is found. + + ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. + Copyright (C) YEAR NAME OF AUTHOR + + 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 . + + Also add information on how to contact you by electronic and paper +mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + PROGRAM Copyright (C) YEAR NAME OF AUTHOR + This program comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’. + This is free software, and you are welcome to redistribute it + under certain conditions; type ‘show c’ for details. + + The hypothetical commands ‘show w’ and ‘show c’ should show the +appropriate parts of the General Public License. Of course, your +program’s commands might be different; for a GUI interface, you would +use an “about box”. + + You should also get your employer (if you work as a programmer) or +school, if any, to sign a “copyright disclaimer” for the program, if +necessary. For more information on this, and how to apply and follow +the GNU GPL, see . + + The GNU General Public License does not permit incorporating your +program into proprietary programs. If your program is a subroutine +library, you may consider it more useful to permit linking proprietary +applications with the library. If this is what you want to do, use the +GNU Lesser General Public License instead of this License. But first, +please read . +  -File: dash.info, Node: Index, Prev: Development, Up: Top +File: dash.info, Node: Index, Prev: GPL, Up: Top Index ***** @@ -3007,7 +4311,6 @@ Index * !cons: Destructive operations. (line 6) * -->: Threading macros. (line 32) -* --doto: Side-effects. (line 83) * ->: Threading macros. (line 6) * ->>: Threading macros. (line 19) * -all?: Predicates. (line 18) @@ -3040,7 +4343,7 @@ Index * -difference: Set operations. (line 20) * -distinct: Set operations. (line 62) * -dotimes: Side-effects. (line 63) -* -doto: Side-effects. (line 72) +* -doto: Side-effects. (line 75) * -drop: Sublist selection. (line 128) * -drop-last: Sublist selection. (line 142) * -drop-while: Sublist selection. (line 171) @@ -3092,13 +4395,13 @@ Index * -juxt: Function combinators. (line 31) * -keep: List to list. (line 8) -* -lambda: Binding. (line 252) +* -lambda: Binding. (line 251) * -last: Other list operations. (line 261) * -last-item: Other list operations. (line 330) * -let: Binding. (line 65) -* -let*: Binding. (line 232) +* -let*: Binding. (line 231) * -list: Other list operations. (line 363) * -map: Maps. (line 10) @@ -3172,7 +4475,7 @@ Index * -select-column: Sublist selection. (line 215) * -select-columns: Sublist selection. (line 196) * -separate: Partitioning. (line 63) -* -setq: Binding. (line 274) +* -setq: Binding. (line 273) * -slice: Sublist selection. (line 85) * -snoc: Other list operations. (line 44) @@ -3222,211 +4525,216 @@ Index (line 119) * -zip-with: Other list operations. (line 79) +* dash-fontify-mode: Fontification of special variables. + (line 6) +* global-dash-fontify-mode: Fontification of special variables. + (line 12)  Tag Table: -Node: Top947 -Node: Installation2424 -Node: Using in a package2991 -Node: Fontification of special variables3352 -Node: Functions4056 -Node: Maps5267 -Ref: -map5562 -Ref: -map-when5903 -Ref: -map-first6481 -Ref: -map-last6959 -Ref: -map-indexed7432 -Ref: -annotate7912 -Ref: -splice8402 -Ref: -splice-list9183 -Ref: -mapcat9645 -Ref: -copy10021 -Node: Sublist selection10225 -Ref: -filter10418 -Ref: -remove10870 -Ref: -remove-first11276 -Ref: -remove-last11803 -Ref: -remove-item12324 -Ref: -non-nil12719 -Ref: -slice12878 -Ref: -take13410 -Ref: -take-last13819 -Ref: -drop14252 -Ref: -drop-last14682 -Ref: -take-while15110 -Ref: -drop-while15636 -Ref: -select-by-indices16160 -Ref: -select-columns16674 -Ref: -select-column17380 -Node: List to list17844 -Ref: -keep18036 -Ref: -concat18539 -Ref: -flatten18836 -Ref: -flatten-n19595 -Ref: -replace19982 -Ref: -replace-first20445 -Ref: -replace-last20942 -Ref: -insert-at21432 -Ref: -replace-at21759 -Ref: -update-at22149 -Ref: -remove-at22640 -Ref: -remove-at-indices23128 -Node: Reductions23710 -Ref: -reduce-from23879 -Ref: -reduce-r-from24645 -Ref: -reduce25412 -Ref: -reduce-r26141 -Ref: -reductions-from27012 -Ref: -reductions-r-from27727 -Ref: -reductions28452 -Ref: -reductions-r29077 -Ref: -count29712 -Ref: -sum29936 -Ref: -running-sum30125 -Ref: -product30418 -Ref: -running-product30627 -Ref: -inits30940 -Ref: -tails31188 -Ref: -common-prefix31435 -Ref: -common-suffix31732 -Ref: -min32029 -Ref: -min-by32255 -Ref: -max32778 -Ref: -max-by33003 -Node: Unfolding33531 -Ref: -iterate33770 -Ref: -unfold34215 -Node: Predicates35023 -Ref: -any?35147 -Ref: -all?35467 -Ref: -none?35797 -Ref: -only-some?36099 -Ref: -contains?36584 -Ref: -same-items?36973 -Ref: -is-prefix?37358 -Ref: -is-suffix?37681 -Ref: -is-infix?38004 -Node: Partitioning38358 -Ref: -split-at38546 -Ref: -split-with38831 -Ref: -split-on39234 -Ref: -split-when39910 -Ref: -separate40550 -Ref: -partition40992 -Ref: -partition-all41444 -Ref: -partition-in-steps41872 -Ref: -partition-all-in-steps42369 -Ref: -partition-by42854 -Ref: -partition-by-header43236 -Ref: -partition-after-pred43840 -Ref: -partition-before-pred44184 -Ref: -partition-before-item44535 -Ref: -partition-after-item44846 -Ref: -group-by45152 -Node: Indexing45589 -Ref: -elem-index45791 -Ref: -elem-indices46186 -Ref: -find-index46569 -Ref: -find-last-index47058 -Ref: -find-indices47562 -Ref: -grade-up47970 -Ref: -grade-down48373 -Node: Set operations48783 -Ref: -union48966 -Ref: -difference49408 -Ref: -intersection49825 -Ref: -powerset50262 -Ref: -permutations50475 -Ref: -distinct50775 -Node: Other list operations51153 -Ref: -rotate51378 -Ref: -repeat51748 -Ref: -cons*52011 -Ref: -snoc52398 -Ref: -interpose52811 -Ref: -interleave53109 -Ref: -zip-with53478 -Ref: -zip54195 -Ref: -zip-lists55027 -Ref: -zip-fill55728 -Ref: -unzip56051 -Ref: -cycle56796 -Ref: -pad57198 -Ref: -table57521 -Ref: -table-flat58310 -Ref: -first59318 -Ref: -some59690 -Ref: -last59999 -Ref: -first-item60333 -Ref: -second-item60749 -Ref: -third-item61029 -Ref: -fourth-item61307 -Ref: -fifth-item61573 -Ref: -last-item61835 -Ref: -butlast62127 -Ref: -sort62374 -Ref: -list62863 -Ref: -fix63194 -Node: Tree operations63734 -Ref: -tree-seq63930 -Ref: -tree-map64788 -Ref: -tree-map-nodes65231 -Ref: -tree-reduce66081 -Ref: -tree-reduce-from66963 -Ref: -tree-mapreduce67564 -Ref: -tree-mapreduce-from68424 -Ref: -clone69710 -Node: Threading macros70038 -Ref: ->70183 -Ref: ->>70674 -Ref: -->71179 -Ref: -as->71735 -Ref: -some->72190 -Ref: -some->>72564 -Ref: -some-->73000 -Node: Binding73471 -Ref: -when-let73683 -Ref: -when-let*74168 -Ref: -if-let74691 -Ref: -if-let*75086 -Ref: -let75703 -Ref: -let*81793 -Ref: -lambda82733 -Ref: -setq83530 -Node: Side-effects84346 -Ref: -each84540 -Ref: -each-while84947 -Ref: -each-indexed85405 -Ref: -each-r85923 -Ref: -each-r-while86356 -Ref: -dotimes86731 -Ref: -doto87034 -Ref: --doto87462 -Node: Destructive operations87737 -Ref: !cons87910 -Ref: !cdr88116 -Node: Function combinators88311 -Ref: -partial88585 -Ref: -rpartial88979 -Ref: -juxt89382 -Ref: -compose89814 -Ref: -applify90367 -Ref: -on90798 -Ref: -flip91324 -Ref: -const91636 -Ref: -cut91975 -Ref: -not92461 -Ref: -orfn92771 -Ref: -andfn93205 -Ref: -iteratefn93700 -Ref: -fixfn94403 -Ref: -prodfn95966 -Node: Development97034 -Node: Contribute97383 -Node: Changes98131 -Node: Contributors101129 -Node: Index102748 +Node: Top742 +Node: Installation2397 +Node: Using in a package3162 +Node: Fontification of special variables3662 +Node: Functions4425 +Node: Maps5909 +Ref: -map6204 +Ref: -map-when6545 +Ref: -map-first7123 +Ref: -map-last7601 +Ref: -map-indexed8074 +Ref: -annotate8554 +Ref: -splice9044 +Ref: -splice-list9825 +Ref: -mapcat10287 +Ref: -copy10663 +Node: Sublist selection10867 +Ref: -filter11060 +Ref: -remove11512 +Ref: -remove-first11918 +Ref: -remove-last12445 +Ref: -remove-item12966 +Ref: -non-nil13361 +Ref: -slice13520 +Ref: -take14052 +Ref: -take-last14461 +Ref: -drop14894 +Ref: -drop-last15324 +Ref: -take-while15752 +Ref: -drop-while16278 +Ref: -select-by-indices16802 +Ref: -select-columns17316 +Ref: -select-column18022 +Node: List to list18486 +Ref: -keep18678 +Ref: -concat19181 +Ref: -flatten19478 +Ref: -flatten-n20237 +Ref: -replace20624 +Ref: -replace-first21087 +Ref: -replace-last21584 +Ref: -insert-at22074 +Ref: -replace-at22401 +Ref: -update-at22791 +Ref: -remove-at23282 +Ref: -remove-at-indices23770 +Node: Reductions24352 +Ref: -reduce-from24521 +Ref: -reduce-r-from25287 +Ref: -reduce26054 +Ref: -reduce-r26783 +Ref: -reductions-from27654 +Ref: -reductions-r-from28369 +Ref: -reductions29094 +Ref: -reductions-r29719 +Ref: -count30354 +Ref: -sum30578 +Ref: -running-sum30767 +Ref: -product31060 +Ref: -running-product31269 +Ref: -inits31582 +Ref: -tails31830 +Ref: -common-prefix32077 +Ref: -common-suffix32374 +Ref: -min32671 +Ref: -min-by32897 +Ref: -max33420 +Ref: -max-by33645 +Node: Unfolding34173 +Ref: -iterate34414 +Ref: -unfold34864 +Node: Predicates35672 +Ref: -any?35796 +Ref: -all?36116 +Ref: -none?36446 +Ref: -only-some?36748 +Ref: -contains?37233 +Ref: -same-items?37622 +Ref: -is-prefix?38007 +Ref: -is-suffix?38330 +Ref: -is-infix?38653 +Node: Partitioning39007 +Ref: -split-at39195 +Ref: -split-with39480 +Ref: -split-on39883 +Ref: -split-when40559 +Ref: -separate41199 +Ref: -partition41641 +Ref: -partition-all42093 +Ref: -partition-in-steps42521 +Ref: -partition-all-in-steps43018 +Ref: -partition-by43503 +Ref: -partition-by-header43885 +Ref: -partition-after-pred44489 +Ref: -partition-before-pred44833 +Ref: -partition-before-item45184 +Ref: -partition-after-item45495 +Ref: -group-by45801 +Node: Indexing46238 +Ref: -elem-index46440 +Ref: -elem-indices46835 +Ref: -find-index47218 +Ref: -find-last-index47707 +Ref: -find-indices48211 +Ref: -grade-up48619 +Ref: -grade-down49022 +Node: Set operations49432 +Ref: -union49615 +Ref: -difference50057 +Ref: -intersection50474 +Ref: -powerset50911 +Ref: -permutations51124 +Ref: -distinct51424 +Node: Other list operations51802 +Ref: -rotate52027 +Ref: -repeat52397 +Ref: -cons*52678 +Ref: -snoc53065 +Ref: -interpose53478 +Ref: -interleave53776 +Ref: -zip-with54145 +Ref: -zip54862 +Ref: -zip-lists55694 +Ref: -zip-fill56395 +Ref: -unzip56718 +Ref: -cycle57463 +Ref: -pad57865 +Ref: -table58188 +Ref: -table-flat58977 +Ref: -first59985 +Ref: -some60357 +Ref: -last60666 +Ref: -first-item61000 +Ref: -second-item61416 +Ref: -third-item61696 +Ref: -fourth-item61974 +Ref: -fifth-item62240 +Ref: -last-item62502 +Ref: -butlast62794 +Ref: -sort63041 +Ref: -list63530 +Ref: -fix63861 +Node: Tree operations64401 +Ref: -tree-seq64597 +Ref: -tree-map65455 +Ref: -tree-map-nodes65898 +Ref: -tree-reduce66748 +Ref: -tree-reduce-from67630 +Ref: -tree-mapreduce68231 +Ref: -tree-mapreduce-from69091 +Ref: -clone70377 +Node: Threading macros70705 +Ref: ->70850 +Ref: ->>71341 +Ref: -->71846 +Ref: -as->72402 +Ref: -some->72857 +Ref: -some->>73231 +Ref: -some-->73667 +Node: Binding74138 +Ref: -when-let74350 +Ref: -when-let*74835 +Ref: -if-let75358 +Ref: -if-let*75753 +Ref: -let76370 +Ref: -let*82445 +Ref: -lambda83385 +Ref: -setq84181 +Node: Side-effects84997 +Ref: -each85191 +Ref: -each-while85598 +Ref: -each-indexed86056 +Ref: -each-r86574 +Ref: -each-r-while87007 +Ref: -dotimes87382 +Ref: -doto87872 +Node: Destructive operations88353 +Ref: !cons88526 +Ref: !cdr88732 +Node: Function combinators88927 +Ref: -partial89201 +Ref: -rpartial89595 +Ref: -juxt89998 +Ref: -compose90430 +Ref: -applify90983 +Ref: -on91414 +Ref: -flip91940 +Ref: -const92252 +Ref: -cut92591 +Ref: -not93077 +Ref: -orfn93387 +Ref: -andfn93821 +Ref: -iteratefn94316 +Ref: -fixfn95019 +Ref: -prodfn96582 +Node: Development97642 +Node: Contribute97995 +Node: Change log99001 +Node: Contributors106539 +Node: FDL108557 +Node: GPL133877 +Node: Index171626  End Tag Table diff --git a/elpa/dash-20210101.1712/dir b/elpa/dash-20210105.414/dir similarity index 99% rename from elpa/dash-20210101.1712/dir rename to elpa/dash-20210105.414/dir index 49b1700d..7d473f49 100644 --- a/elpa/dash-20210101.1712/dir +++ b/elpa/dash-20210105.414/dir @@ -15,4 +15,4 @@ File: dir, Node: Top This is the top of the INFO tree * Menu: Emacs -* Dash: (dash.info). A modern list library for GNU Emacs +* Dash: (dash.info). A modern list library for GNU Emacs. diff --git a/elpa/smartparens-20200105.1259/smartparens-pkg.el b/elpa/smartparens-20200105.1259/smartparens-pkg.el deleted file mode 100644 index 1fd39009..00000000 --- a/elpa/smartparens-20200105.1259/smartparens-pkg.el +++ /dev/null @@ -1,6 +0,0 @@ -(define-package "smartparens" "20200105.1259" "Automatic insertion, wrapping and paredit-like navigation with user defined pairs." - '((dash "2.13.0") - (cl-lib "0.3"))) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/smartparens-20200105.1259/smartparens-autoloads.el b/elpa/smartparens-20201229.1937/smartparens-autoloads.el similarity index 83% rename from elpa/smartparens-20200105.1259/smartparens-autoloads.el rename to elpa/smartparens-20201229.1937/smartparens-autoloads.el index f433e335..04931a77 100644 --- a/elpa/smartparens-20200105.1259/smartparens-autoloads.el +++ b/elpa/smartparens-20201229.1937/smartparens-autoloads.el @@ -31,18 +31,19 @@ better orientation. Keymap used for `smartparens-mode'.") (autoload 'sp-use-paredit-bindings "smartparens" "\ -Initiate `smartparens-mode-map' with `sp-paredit-bindings'. - -\(fn)" t nil) +Initiate `smartparens-mode-map' with `sp-paredit-bindings'." t nil) (autoload 'sp-use-smartparens-bindings "smartparens" "\ -Initiate `smartparens-mode-map' with `sp-smartparens-bindings'. - -\(fn)" t nil) +Initiate `smartparens-mode-map' with `sp-smartparens-bindings'." t nil) (autoload 'smartparens-mode "smartparens" "\ Toggle smartparens mode. +If called interactively, enable Smartparens 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. + You can enable pre-set bindings by customizing `sp-base-key-bindings' variable. The current content of `smartparens-mode-map' is: @@ -54,6 +55,11 @@ You can enable pre-set bindings by customizing (autoload 'smartparens-strict-mode "smartparens" "\ Toggle the strict smartparens mode. +If called interactively, enable Smartparens-Strict 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. + When strict mode is active, `delete-char', `kill-word' and their backward variants will skip over the pair delimiters in order to keep the structure always valid (the same way as `paredit-mode' @@ -67,6 +73,8 @@ after the smartparens indicator in the mode list. \(fn &optional ARG)" t nil) +(put 'smartparens-global-strict-mode 'globalized-minor-mode t) + (defvar smartparens-global-strict-mode nil "\ Non-nil if Smartparens-Global-Strict mode is enabled. See the `smartparens-global-strict-mode' command @@ -90,14 +98,12 @@ See `smartparens-strict-mode' for more information on Smartparens-Strict mode. \(fn &optional ARG)" t nil) (autoload 'turn-on-smartparens-strict-mode "smartparens" "\ -Turn on `smartparens-strict-mode'. - -\(fn)" t nil) +Turn on `smartparens-strict-mode'." t nil) (autoload 'turn-off-smartparens-strict-mode "smartparens" "\ -Turn off `smartparens-strict-mode'. +Turn off `smartparens-strict-mode'." t nil) -\(fn)" t nil) +(put 'smartparens-global-mode 'globalized-minor-mode t) (defvar smartparens-global-mode nil "\ Non-nil if Smartparens-Global mode is enabled. @@ -133,14 +139,10 @@ buffers. Additionally, buffers on `sp-ignore-modes-list' are ignored. You can still turn on smartparens in these mode manually (or -in mode's startup-hook etc.) by calling `smartparens-mode'. - -\(fn)" t nil) +in mode's startup-hook etc.) by calling `smartparens-mode'." t nil) (autoload 'turn-off-smartparens-mode "smartparens" "\ -Turn off `smartparens-mode'. - -\(fn)" t nil) +Turn off `smartparens-mode'." t nil) (autoload 'show-smartparens-mode "smartparens" "\ Toggle visualization of matching pairs. When enabled, any @@ -149,8 +151,15 @@ of Emacs idle time if the point is immediately in front or after a pair. This mode works similarly to `show-paren-mode', but support custom pairs. +If called interactively, enable Show-Smartparens 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. + \(fn &optional ARG)" t nil) +(put 'show-smartparens-global-mode 'globalized-minor-mode t) + (defvar show-smartparens-global-mode nil "\ Non-nil if Show-Smartparens-Global mode is enabled. See the `show-smartparens-global-mode' command @@ -174,14 +183,10 @@ See `show-smartparens-mode' for more information on Show-Smartparens mode. \(fn &optional ARG)" t nil) (autoload 'turn-on-show-smartparens-mode "smartparens" "\ -Turn on `show-smartparens-mode'. - -\(fn)" t nil) +Turn on `show-smartparens-mode'." t nil) (autoload 'turn-off-show-smartparens-mode "smartparens" "\ -Turn off `show-smartparens-mode'. - -\(fn)" t nil) +Turn off `show-smartparens-mode'." t nil) (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens" '("smartparens-" "sp-"))) @@ -279,7 +284,15 @@ Turn off `show-smartparens-mode'. ;;;;;; (0 0 0 0)) ;;; Generated autoloads from smartparens-python.el -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-python" '("sp-python-fix-tripple-quotes"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-python" '("sp-python-"))) + +;;;*** + +;;;### (autoloads nil "smartparens-rst" "smartparens-rst.el" (0 0 +;;;;;; 0 0)) +;;; Generated autoloads from smartparens-rst.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-rst" '("sp-rst-point-after-backtick"))) ;;;*** @@ -313,11 +326,19 @@ Turn off `show-smartparens-mode'. (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "smartparens-text" '("sp-text-mode-"))) +;;;*** + +;;;### (autoloads nil "sp-sublimetext-like" "sp-sublimetext-like.el" +;;;;;; (0 0 0 0)) +;;; Generated autoloads from sp-sublimetext-like.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "sp-sublimetext-like" '("sp-point-not-before-word"))) + ;;;*** ;;;### (autoloads nil nil ("smartparens-c.el" "smartparens-javascript.el" -;;;;;; "smartparens-ml.el" "smartparens-pkg.el" "smartparens-racket.el" -;;;;;; "smartparens-rst.el") (0 0 0 0)) +;;;;;; "smartparens-ml.el" "smartparens-pkg.el" "smartparens-racket.el") +;;;;;; (0 0 0 0)) ;;;*** diff --git a/elpa/smartparens-20200105.1259/smartparens-c.el b/elpa/smartparens-20201229.1937/smartparens-c.el similarity index 96% rename from elpa/smartparens-20200105.1259/smartparens-c.el rename to elpa/smartparens-20201229.1937/smartparens-c.el index 58216a83..eeb96b5a 100644 --- a/elpa/smartparens-20200105.1259/smartparens-c.el +++ b/elpa/smartparens-20201229.1937/smartparens-c.el @@ -45,7 +45,7 @@ (sp-with-modes sp-c-modes (sp-local-pair "{" nil :post-handlers '(("||\n[i]" "RET"))) - (sp-local-pair "/*" "*/" :post-handlers '((" | " "SPC") + (sp-local-pair "/*" "*/" :post-handlers '(("| " "SPC") ("* ||\n[i]" "RET")))) (provide 'smartparens-c) diff --git a/elpa/smartparens-20200105.1259/smartparens-clojure.el b/elpa/smartparens-20201229.1937/smartparens-clojure.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-clojure.el rename to elpa/smartparens-20201229.1937/smartparens-clojure.el diff --git a/elpa/smartparens-20200105.1259/smartparens-config.el b/elpa/smartparens-20201229.1937/smartparens-config.el similarity index 97% rename from elpa/smartparens-20200105.1259/smartparens-config.el rename to elpa/smartparens-20201229.1937/smartparens-config.el index 1d2e4b0b..6e17e4b4 100644 --- a/elpa/smartparens-20200105.1259/smartparens-config.el +++ b/elpa/smartparens-20201229.1937/smartparens-config.el @@ -101,8 +101,7 @@ ID, ACTION, CONTEXT." ;; automatically. If you want to call sp-local-pair outside this ;; macro, you MUST supply the major mode argument. -(--each sp-c-modes - (eval-after-load it '(require 'smartparens-c))) +(eval-after-load 'cc-mode '(require 'smartparens-c)) (eval-after-load 'clojure-mode '(require 'smartparens-clojure)) (eval-after-load 'crystal-mode '(require 'smartparens-crystal)) (eval-after-load 'elixir-mode '(require 'smartparens-elixir)) @@ -122,6 +121,7 @@ ID, ACTION, CONTEXT." (eval-after-load 'rst '(require 'smartparens-rst)) (eval-after-load 'ruby-mode '(require 'smartparens-ruby)) (eval-after-load 'rust-mode '(require 'smartparens-rust)) +(eval-after-load 'rustic '(require 'smartparens-rust)) (eval-after-load 'scala-mode '(require 'smartparens-scala)) (eval-after-load 'tex-mode '(require 'smartparens-latex)) (eval-after-load 'text-mode '(require 'smartparens-text)) diff --git a/elpa/smartparens-20200105.1259/smartparens-crystal.el b/elpa/smartparens-20201229.1937/smartparens-crystal.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-crystal.el rename to elpa/smartparens-20201229.1937/smartparens-crystal.el diff --git a/elpa/smartparens-20200105.1259/smartparens-elixir.el b/elpa/smartparens-20201229.1937/smartparens-elixir.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-elixir.el rename to elpa/smartparens-20201229.1937/smartparens-elixir.el diff --git a/elpa/smartparens-20200105.1259/smartparens-ess.el b/elpa/smartparens-20201229.1937/smartparens-ess.el similarity index 92% rename from elpa/smartparens-20200105.1259/smartparens-ess.el rename to elpa/smartparens-20201229.1937/smartparens-ess.el index 3bac0b5f..15b923ea 100644 --- a/elpa/smartparens-20200105.1259/smartparens-ess.el +++ b/elpa/smartparens-20201229.1937/smartparens-ess.el @@ -44,15 +44,21 @@ (declare-function ess-roxy-indent-on-newline "ess-roxy") -;; avoid traveling commas when slurping -;; (|a, b), c ---> (|a, b, c) -(dolist (mode '(ess-mode inferior-ess-mode)) - (add-to-list 'sp-sexp-suffix (list mode 'regexp ""))) - -;; `sp-sexp-prefix' for ESS -(add-to-list 'sp-sexp-prefix - (list 'ess-mode 'regexp - (rx (zero-or-more (or word (syntax symbol)))))) +(dolist (mode '(ess-mode ess-r-mode inferior-ess-mode inferior-ess-r-mode)) + ;; avoid traveling commas when slurping + ;; (|a, b), c ---> (|a, b, c) + (add-to-list 'sp-sexp-suffix (list mode 'regexp "")) + ;; `sp-sexp-prefix' for ESS + (add-to-list 'sp-sexp-prefix + (list mode 'regexp + (rx (zero-or-more (or word (syntax symbol))))))) + +(defadvice sp-backward-kill-symbol (around sp-ess-backward-kill-symbol activate) + "#821 For the purpose of killing words and symbols, we remove +the prefix resolution because it is not necessary. We want to +treat function prefix as word or symbol to be deleted." + (let ((sp-sexp-prefix nil)) + ad-do-it)) ;; slurping follows Google's R style guide ;; see https://google.github.io/styleguide/Rguide.xml diff --git a/elpa/smartparens-20200105.1259/smartparens-haskell.el b/elpa/smartparens-20201229.1937/smartparens-haskell.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-haskell.el rename to elpa/smartparens-20201229.1937/smartparens-haskell.el diff --git a/elpa/smartparens-20200105.1259/smartparens-html.el b/elpa/smartparens-20201229.1937/smartparens-html.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-html.el rename to elpa/smartparens-20201229.1937/smartparens-html.el diff --git a/elpa/smartparens-20200105.1259/smartparens-javascript.el b/elpa/smartparens-20201229.1937/smartparens-javascript.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-javascript.el rename to elpa/smartparens-20201229.1937/smartparens-javascript.el diff --git a/elpa/smartparens-20200105.1259/smartparens-latex.el b/elpa/smartparens-20201229.1937/smartparens-latex.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-latex.el rename to elpa/smartparens-20201229.1937/smartparens-latex.el diff --git a/elpa/smartparens-20200105.1259/smartparens-lua.el b/elpa/smartparens-20201229.1937/smartparens-lua.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-lua.el rename to elpa/smartparens-20201229.1937/smartparens-lua.el diff --git a/elpa/smartparens-20200105.1259/smartparens-markdown.el b/elpa/smartparens-20201229.1937/smartparens-markdown.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-markdown.el rename to elpa/smartparens-20201229.1937/smartparens-markdown.el diff --git a/elpa/smartparens-20200105.1259/smartparens-ml.el b/elpa/smartparens-20201229.1937/smartparens-ml.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-ml.el rename to elpa/smartparens-20201229.1937/smartparens-ml.el diff --git a/elpa/smartparens-20200105.1259/smartparens-org.el b/elpa/smartparens-20201229.1937/smartparens-org.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-org.el rename to elpa/smartparens-20201229.1937/smartparens-org.el diff --git a/elpa/smartparens-20201229.1937/smartparens-pkg.el b/elpa/smartparens-20201229.1937/smartparens-pkg.el new file mode 100644 index 00000000..9645fa2b --- /dev/null +++ b/elpa/smartparens-20201229.1937/smartparens-pkg.el @@ -0,0 +1,13 @@ +(define-package "smartparens" "20201229.1937" "Automatic insertion, wrapping and paredit-like navigation with user defined pairs." + '((dash "2.13.0") + (cl-lib "0.3")) + :commit "63695c64233d215a92bf08e762f643cdb595bdd9" :authors + '(("Matus Goljer" . "matus.goljer@gmail.com")) + :maintainer + '("Matus Goljer" . "matus.goljer@gmail.com") + :keywords + '("abbrev" "convenience" "editing") + :url "https://github.com/Fuco1/smartparens") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/smartparens-20200105.1259/smartparens-python.el b/elpa/smartparens-20201229.1937/smartparens-python.el similarity index 76% rename from elpa/smartparens-20200105.1259/smartparens-python.el rename to elpa/smartparens-20201229.1937/smartparens-python.el index d6ac93ff..4ad3cf2b 100644 --- a/elpa/smartparens-20200105.1259/smartparens-python.el +++ b/elpa/smartparens-20201229.1937/smartparens-python.el @@ -47,18 +47,42 @@ (require 'smartparens) +(defgroup smartparens-python () + "smartparens settings for python-mode" + :group 'smartparens) + +(defcustom sp-python-insert-colon-in-function-definitions t + "Whether to auto-insert a colon when parens insertion is +triggered while typing a function definition" + :group 'smartparens-python + :type 'boolean) + ;; Python has no sexp suffices. This fixes slurping ;; (|sys).path.append---the dot should not travel with the closing ;; paren (--each '(python-mode inferior-python-mode) (add-to-list 'sp-sexp-suffix (list it 'regexp ""))) +(defun sp-python-maybe-add-colon-python (_id action _context) + "Adds a colon after parentheses in a python function definition" + ;; here, caret supposed to be in between parens, i.e. (|) + (when (and sp-python-insert-colon-in-function-definitions + (eq action 'insert) + (looking-at ")\\s-*$") + (save-excursion + (goto-char (line-beginning-position)) + (re-search-forward "^\\s-*def\\b" (line-end-position)))) + (save-excursion + (forward-char) ;; skip closing paren + (insert ":")))) + (sp-with-modes 'python-mode (sp-local-pair "'" "'" :unless '(sp-in-comment-p sp-in-string-quotes-p) :post-handlers '(:add sp-python-fix-tripple-quotes)) (sp-local-pair "\"" "\"" :post-handlers '(:add sp-python-fix-tripple-quotes)) (sp-local-pair "'''" "'''") (sp-local-pair "\\'" "\\'") - (sp-local-pair "\"\"\"" "\"\"\"")) + (sp-local-pair "\"\"\"" "\"\"\"") + (sp-local-pair "(" ")" :post-handlers '(:add sp-python-maybe-add-colon-python))) (defun sp-python-fix-tripple-quotes (id action _context) "Properly rewrap tripple quote pairs. diff --git a/elpa/smartparens-20200105.1259/smartparens-racket.el b/elpa/smartparens-20201229.1937/smartparens-racket.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-racket.el rename to elpa/smartparens-20201229.1937/smartparens-racket.el diff --git a/elpa/smartparens-20200105.1259/smartparens-rst.el b/elpa/smartparens-20201229.1937/smartparens-rst.el similarity index 90% rename from elpa/smartparens-20200105.1259/smartparens-rst.el rename to elpa/smartparens-20201229.1937/smartparens-rst.el index b1e25f8a..ceac6a63 100644 --- a/elpa/smartparens-20200105.1259/smartparens-rst.el +++ b/elpa/smartparens-20201229.1937/smartparens-rst.el @@ -49,13 +49,17 @@ (require 'smartparens-text) (require 'smartparens-markdown) +(defun sp-rst-point-after-backtick (_id action _context) + (when (eq action 'insert) + (sp--looking-back-p "`_"))) + (sp-with-modes 'rst-mode (sp-local-pair "*" "*" :unless '(sp--gfm-point-after-word-p sp-point-at-bol-p) :post-handlers '(("[d1]" "SPC")) :skip-match 'sp--gfm-skip-asterisk) (sp-local-pair "**" "**") - (sp-local-pair "_" "_" :unless '(sp-point-after-word-p)) + (sp-local-pair "_" "_" :unless '(sp-point-after-word-p sp-rst-point-after-backtick)) (sp-local-pair "``" "``")) (provide 'smartparens-rst) diff --git a/elpa/smartparens-20200105.1259/smartparens-ruby.el b/elpa/smartparens-20201229.1937/smartparens-ruby.el similarity index 99% rename from elpa/smartparens-20200105.1259/smartparens-ruby.el rename to elpa/smartparens-20201229.1937/smartparens-ruby.el index ed504842..3ba86716 100644 --- a/elpa/smartparens-20200105.1259/smartparens-ruby.el +++ b/elpa/smartparens-20201229.1937/smartparens-ruby.el @@ -127,8 +127,7 @@ ID, ACTION, CONTEXT." (when (equal action 'barf-forward) (sp-get enc - (let ((beg-line (line-number-at-pos :beg-in)) - (end-line (line-number-at-pos :end-in))) + (let ((beg-line (line-number-at-pos :beg-in))) (sp-forward-sexp arg) (sp-ruby-maybe-one-space) (when (not (= (line-number-at-pos) beg-line)) diff --git a/elpa/smartparens-20200105.1259/smartparens-rust.el b/elpa/smartparens-20201229.1937/smartparens-rust.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-rust.el rename to elpa/smartparens-20201229.1937/smartparens-rust.el diff --git a/elpa/smartparens-20200105.1259/smartparens-scala.el b/elpa/smartparens-20201229.1937/smartparens-scala.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-scala.el rename to elpa/smartparens-20201229.1937/smartparens-scala.el diff --git a/elpa/smartparens-20200105.1259/smartparens-text.el b/elpa/smartparens-20201229.1937/smartparens-text.el similarity index 100% rename from elpa/smartparens-20200105.1259/smartparens-text.el rename to elpa/smartparens-20201229.1937/smartparens-text.el diff --git a/elpa/smartparens-20200105.1259/smartparens.el b/elpa/smartparens-20201229.1937/smartparens.el similarity index 97% rename from elpa/smartparens-20200105.1259/smartparens.el rename to elpa/smartparens-20201229.1937/smartparens.el index fea2d3ee..88e10daf 100644 --- a/elpa/smartparens-20200105.1259/smartparens.el +++ b/elpa/smartparens-20201229.1937/smartparens.el @@ -399,28 +399,23 @@ See `sp-base-key-bindings'." :set 'sp--update-override-key-bindings :group 'smartparens) -(defvar sp-escape-char nil +(defvar-local sp-escape-char nil "Character used to escape quotes inside strings.") -(make-variable-buffer-local 'sp-escape-char) -(defvar sp-comment-char nil +(defvar-local sp-comment-char nil "Character used to start comments.") -(make-variable-buffer-local 'sp-comment-char) -(defvar sp-pair-list nil +(defvar-local sp-pair-list nil "List of pairs for autoinsertion or wrapping. Maximum length of opening or closing pair is `sp-max-pair-length' characters.") -(make-variable-buffer-local 'sp-pair-list) -(defvar sp-local-pairs nil +(defvar-local sp-local-pairs nil "List of pair definitions used for current buffer.") -(make-variable-buffer-local 'sp-local-pairs) -(defvar sp-last-operation nil +(defvar-local sp-last-operation nil "Symbol holding the last successful operation.") -(make-variable-buffer-local 'sp-last-operation) (cl-defstruct sp-state "Smartparens state for the current buffer." @@ -447,57 +442,49 @@ Maximum length of opening or closing pair is local-pairs ) -(defvar sp-state (make-sp-state) +(defvar-local sp-state (make-sp-state) "Smartparens state for the current buffer.") -(make-variable-buffer-local 'sp-state) ;; TODO: get rid of this -(defvar sp-previous-point -1 +(defvar-local sp-previous-point -1 "Location of point before last command. This is only updated when some pair-overlay is active. Do not rely on the value of this variable anywhere else!") -(make-variable-buffer-local 'sp-previous-point) ;; TODO: get rid of this -(defvar sp-wrap-point nil +(defvar-local sp-wrap-point nil "Save the value of point before attemt to wrap a region. Used for restoring the original state if the wrapping is cancelled.") -(make-variable-buffer-local 'sp-wrap-point) ;; TODO: get rid of this -(defvar sp-wrap-mark nil +(defvar-local sp-wrap-mark nil "Save the value of mark before attemt to wrap a region. Used for restoring the original state if the wrapping is cancelled.") -(make-variable-buffer-local 'sp-wrap-mark) -(defvar sp-last-inserted-characters "" +(defvar-local sp-last-inserted-characters "" "Characters typed during the wrapping selection. If wrapping is cancelled, these characters are re-inserted to the location of point before the wrapping.") -(make-variable-buffer-local 'sp-last-inserted-characters) -(defvar sp-last-inserted-pair nil +(defvar-local sp-last-inserted-pair nil "Last inserted pair.") -(make-variable-buffer-local 'sp-last-inserted-pair) -(defvar sp-delayed-pair nil +(defvar-local sp-delayed-pair nil "The pair whose insertion is being delayed. The insertion of this pair is delayed to be carried out in `sp--post-command-hook-handler'. The format is (opening delim . beg of the opening delim)") -(make-variable-buffer-local 'sp-delayed-pair) -(defvar sp-last-wrapped-region nil +(defvar-local sp-last-wrapped-region nil "Information about the last wrapped region. The format is the same as returned by `sp-get-sexp'.") -(make-variable-buffer-local 'sp-last-wrapped-region) (defvar sp-point-inside-string nil "Non-nil if point is inside a string. @@ -2686,22 +2673,19 @@ See `sp-wrap-overlay-face'." "The face used to highlight wrap tag overlays." :group 'smartparens) -(defvar sp-pair-overlay-list '() +(defvar-local sp-pair-overlay-list '() "List of overlays used for tracking inserted pairs. When a pair is inserted, an overlay is created over it. When the user starts typing the closing pair we will not insert it again. If user leaves the overlay, it is canceled and the insertion works again as usual.") -(make-variable-buffer-local 'sp-pair-overlay-list) -(defvar sp-wrap-overlays nil +(defvar-local sp-wrap-overlays nil "Cons pair of wrap overlays.") -(make-variable-buffer-local 'sp-wrap-overlays) -(defvar sp-wrap-tag-overlays nil +(defvar-local sp-wrap-tag-overlays nil "Cons pair of tag wrap overlays.") -(make-variable-buffer-local 'sp-wrap-tag-overlays) (defvar sp-pair-overlay-keymap (make-sparse-keymap) "Keymap for the pair overlays.") @@ -3645,8 +3629,13 @@ Return non-nil if at least one escaping was performed." ;; before inserting the "" pair it is now split into two ;; -> which moves us outside the pair (not (eq context 'string)) - ;; the inserted character must have string syntax, otherwise no "context" flip happens - (eq (char-syntax (aref id 0)) ?\")) + ;; the inserted character must have string syntax, + ;; otherwise no "context" flip happens + (eq (syntax-class + (syntax-after + (save-excursion + (backward-char (length id)) + (point)))) 7)) (let ((open id) (close (sp-get-pair id :close))) (sp--escape-region (list open close) @@ -5243,8 +5232,9 @@ is used to retrieve the prefix instead of the global setting." (let* ((pref (sp-get-pair op :prefix)) (prefix (if pref - (when (sp--looking-back pref sp-max-prefix-length) - (match-string-no-properties 0)) + (if (sp--looking-back pref sp-max-prefix-length) + (match-string-no-properties 0) + "") (-if-let (mmode-prefix (cdr (assoc major-mode sp-sexp-prefix))) (cond ((and (eq (car mmode-prefix) 'regexp) @@ -5285,8 +5275,9 @@ is used to retrieve the suffix instead of the global setting." (let* ((suff (sp-get-pair op :suffix)) (suffix (if suff - (when (sp--looking-at suff) - (match-string-no-properties 0)) + (if (sp--looking-at suff) + (match-string-no-properties 0) + "") (-if-let (mmode-suffix (cdr (assoc major-mode sp-sexp-suffix))) (cond ((and (eq (car mmode-suffix) 'regexp) @@ -7412,7 +7403,8 @@ Examples: (prefix arg in comment) (list :arg arg :enc enc))) (sp-get (sp-get-enclosing-sexp) (sp-do-move-cl (point)) - (sp--indent-region :beg :end) + (sp--keep-indentation + (sp--indent-region :beg :end)) (sp--run-hook-with-args :op :post-handlers 'barf-forward (list :arg arg :enc enc)))))) (sp-backward-barf-sexp (sp--negate-argument old-arg))))) @@ -7479,8 +7471,9 @@ Examples: ;; pair that was not allowed before. However, such a call is ;; never made in SP, so it's OK for now (allowed-pairs (sp--get-allowed-regexp)) - (allowed-open (sp--get-opening-regexp (sp--get-allowed-pair-list))) - (allowed-close (sp--get-closing-regexp (sp--get-allowed-pair-list))) + ,(if forward + '(allowed-close (sp--get-closing-regexp (sp--get-allowed-pair-list))) + '(allowed-open (sp--get-opening-regexp (sp--get-allowed-pair-list)))) (allowed-strings (sp--get-stringlike-regexp)) (prefix nil)) (while (and (not (or ,eob-test @@ -7515,8 +7508,8 @@ Examples: (and (or (,(if forward 'sp--looking-back 'sp--looking-at) ,(if forward 'allowed-close 'allowed-open)) (,(if forward 'sp--looking-back 'sp--looking-at) allowed-strings)) - (progn - (setq prefix (,prefix-fn)) + (let ((op (match-string 0))) + (setq prefix (,prefix-fn (point) op)) (> (length prefix) 0))))) (if (and (not in-comment) (sp-point-in-comment)) @@ -7524,7 +7517,8 @@ Examples: (goto-char (,comment-bound (sp-get-comment-bounds))) (unless ,eob-test (,forward-fn 1))) (unless ,eob-test - (,forward-fn (max (length prefix) 1)))))))) + (,forward-fn (max (length prefix) 1)))) + (setq prefix nil))))) (defun sp-skip-forward-to-symbol (&optional stop-at-string stop-after-string stop-inside-string) "Skip whitespace and comments moving forward. @@ -7627,7 +7621,13 @@ Examples: (or (not allowed) (not (or (sp--valid-initial-delimiter-p (sp--looking-at open)) (sp--valid-initial-delimiter-p (sp--looking-at close))))) - (memq (char-syntax (following-char)) '(?w ?_))) + (or (memq (char-syntax (following-char)) '(?w ?_)) + ;; Specifically for lisp, we consider + ;; sequences of ?\ a symbol + ;; sequence + (and (eq (char-before) ??) + (eq (char-syntax (following-char)) ?\\)) + (and (eq (char-syntax (char-before)) ?\\)))) (forward-char)) (setq n (1- n))) (sp-backward-symbol n))))) @@ -7676,7 +7676,13 @@ Examples: (while (and (not (bobp)) (not (or (sp--valid-initial-delimiter-p (sp--looking-back open)) (sp--valid-initial-delimiter-p (sp--looking-back close)))) - (memq (char-syntax (preceding-char)) '(?w ?_))) + (or (memq (char-syntax (preceding-char)) '(?w ?_)) + ;; Specifically for lisp, we consider + ;; sequences of ?\ a symbol + ;; sequence + (and (eq (char-before (1- (point))) ??) + (eq (char-syntax (preceding-char)) ?\\)) + )) (backward-char)) ;; skip characters which are symbols with prefix flag (while (and (not (eobp)) @@ -8407,8 +8413,8 @@ Examples: (sp-point-in-string)))) (-when-let (ok (if should-split-as-string (save-excursion - (goto-char (1- (cdr (sp-get-quoted-string-bounds)))) - (sp-get-enclosing-sexp 1)) + (goto-char (car (sp-get-quoted-string-bounds))) + (sp-get-sexp)) (sp-get-enclosing-sexp 1))) (sp-get ok (sp--run-hook-with-args :op :pre-handlers 'split-sexp) @@ -9402,64 +9408,105 @@ support custom pairs." (sp-show--pair-enc-function ok))) (execute-kbd-macro cmd)))) +(eval-when-compile + (defalias 'sp--while-no-input 'while-no-input) + (when (version< emacs-version "27") + ;; Ripped from Emacs 27.0 subr.el. + ;; See Github Issue#946 and Emacs bug#31692. + (defmacro sp--while-no-input (&rest body) + "Execute BODY only as long as there's no pending input. +If input arrives, that ends the execution of BODY, +and `while-no-input' returns t. Quitting makes it return nil. +If BODY finishes, `while-no-input' returns whatever value BODY produced." + (declare (debug t) (indent 0)) + (let ((catch-sym (make-symbol "input"))) + `(with-local-quit + (catch ',catch-sym + (let ((throw-on-input ',catch-sym) + val) + (setq val (or (input-pending-p) + (progn ,@body))) + (cond + ;; When input arrives while throw-on-input is non-nil, + ;; kbd_buffer_store_buffered_event sets quit-flag to the + ;; value of throw-on-input. If, when BODY finishes, + ;; quit-flag still has the same value as throw-on-input, it + ;; means BODY never tested quit-flag, and therefore ran to + ;; completion even though input did arrive before it + ;; finished. In that case, we must manually simulate what + ;; 'throw' in process_quit_flag would do, and we must + ;; reset quit-flag, because leaving it set will cause us + ;; quit to top-level, which has undesirable consequences, + ;; such as discarding input etc. We return t in that case + ;; because input did arrive during execution of BODY. + ((eq quit-flag throw-on-input) + (setq quit-flag nil) + t) + ;; This is for when the user actually QUITs during + ;; execution of BODY. + (quit-flag + nil) + (t val))))))))) + (defun sp-show--pair-function () "Display the show pair overlays and print the line of the matching paren in the echo area if not visible on screen." (when show-smartparens-mode (sp--with-case-sensitive (save-match-data - (cl-labels ((scan-and-place-overlays - (match &optional back) - ;; we can use `sp-get-thing' here because we *are* at some - ;; pair opening, and so only the tag or the sexp can trigger. - (-if-let (ok (sp-get-thing back)) - (sp-get ok - (when (or (and back - (or (= :end (point)) - (= :beg-in (point)))) - (and (not back) - (or (= :beg (point)) - (= :end-in (point))))) - (sp-show--pair-create-overlays :beg :end :op-l :cl-l) - (when (and sp-echo-match-when-invisible - (not (or (active-minibuffer-window) cursor-in-echo-area))) - (sp-show--pair-echo-match :beg :end :op-l :cl-l)))) - (if back - (sp-show--pair-create-mismatch-overlay (- (point) (length match)) - (length match)) - (sp-show--pair-create-mismatch-overlay (point) (length match))) - (setq sp-show-pair-previous-match-positions nil) - (setq sp-show-pair-previous-point nil)))) - (let* ((pair-list (sp--get-allowed-pair-list)) - (opening (sp--get-opening-regexp pair-list)) - (closing (sp--get-closing-regexp pair-list)) - (allowed (and sp-show-pair-from-inside (sp--get-allowed-regexp)))) - (cond - ;; if we are in a situation "()|", we should highlight the - ;; regular pair and not the string pair "from inside" - ((and (not (sp--evil-normal-state-p)) - (not (sp--evil-motion-state-p)) - (not (sp--evil-visual-state-p)) - (sp--looking-back (if sp-show-pair-from-inside allowed closing))) - (scan-and-place-overlays (match-string 0) :back)) - ((or (and (or (sp--evil-normal-state-p) - (sp--evil-motion-state-p) - (sp--evil-visual-state-p)) - (sp--looking-at (sp--get-allowed-regexp))) - (sp--looking-at (if sp-show-pair-from-inside allowed opening)) - (looking-at (sp--get-stringlike-regexp)) - (and (memq major-mode sp-navigate-consider-sgml-tags) - (looking-at "<"))) - (scan-and-place-overlays (match-string 0))) - ((or (sp--looking-back (if sp-show-pair-from-inside allowed closing)) - (sp--looking-back (sp--get-stringlike-regexp)) - (and (memq major-mode sp-navigate-consider-sgml-tags) - (sp--looking-back ">"))) - (scan-and-place-overlays (match-string 0) :back)) - (sp-show-pair-overlays - (sp-show--pair-delete-overlays) - (setq sp-show-pair-previous-match-positions nil) - (setq sp-show-pair-previous-point nil))))))))) + (sp--while-no-input + (cl-labels ((scan-and-place-overlays + (match &optional back) + ;; we can use `sp-get-thing' here because we *are* at some + ;; pair opening, and so only the tag or the sexp can trigger. + (-if-let (ok (sp-get-thing back)) + (sp-get ok + (when (or (and back + (or (= :end (point)) + (= :beg-in (point)))) + (and (not back) + (or (= :beg (point)) + (= :end-in (point))))) + (sp-show--pair-create-overlays :beg :end :op-l :cl-l) + (when (and sp-echo-match-when-invisible + (not (or (active-minibuffer-window) cursor-in-echo-area))) + (sp-show--pair-echo-match :beg :end :op-l :cl-l)))) + (if back + (sp-show--pair-create-mismatch-overlay (- (point) (length match)) + (length match)) + (sp-show--pair-create-mismatch-overlay (point) (length match))) + (setq sp-show-pair-previous-match-positions nil) + (setq sp-show-pair-previous-point nil)))) + (let* ((pair-list (sp--get-allowed-pair-list)) + (opening (sp--get-opening-regexp pair-list)) + (closing (sp--get-closing-regexp pair-list)) + (allowed (and sp-show-pair-from-inside (sp--get-allowed-regexp)))) + (cond + ;; if we are in a situation "()|", we should highlight the + ;; regular pair and not the string pair "from inside" + ((and (not (sp--evil-normal-state-p)) + (not (sp--evil-motion-state-p)) + (not (sp--evil-visual-state-p)) + (sp--looking-back (if sp-show-pair-from-inside allowed closing))) + (scan-and-place-overlays (match-string 0) :back)) + ((or (and (or (sp--evil-normal-state-p) + (sp--evil-motion-state-p) + (sp--evil-visual-state-p)) + (sp--looking-at (sp--get-allowed-regexp))) + (sp--looking-at (if sp-show-pair-from-inside allowed opening)) + (looking-at (sp--get-stringlike-regexp)) + (and (memq major-mode sp-navigate-consider-sgml-tags) + (looking-at "<"))) + (scan-and-place-overlays (match-string 0))) + ((or (sp--looking-back (if sp-show-pair-from-inside allowed closing)) + (sp--looking-back (sp--get-stringlike-regexp)) + (and (memq major-mode sp-navigate-consider-sgml-tags) + (sp--looking-back ">"))) + (scan-and-place-overlays (match-string 0) :back)) + (sp-show-pair-overlays + (sp-show--pair-delete-overlays) + (setq sp-show-pair-previous-match-positions nil) + (setq sp-show-pair-previous-point nil)))))))))) (defun sp-show--pair-enc-function (&optional thing) "Display the show pair overlays for enclosing expression." diff --git a/elpa/smartparens-20201229.1937/sp-sublimetext-like.el b/elpa/smartparens-20201229.1937/sp-sublimetext-like.el new file mode 100644 index 00000000..1cae7f43 --- /dev/null +++ b/elpa/smartparens-20201229.1937/sp-sublimetext-like.el @@ -0,0 +1,57 @@ +;;; sp-sublimetext-like.el --- Behavior for inserting parentheses similar to SublimeText editor. -*- lexical-binding: t; -*- +;; +;; Author: Konstantin Kharlamov +;; Maintainer: Matus Goljer +;; Created: 16 December 2020 +;; Keywords: convenience editing +;; URL: https://github.com/Fuco1/smartparens +;; +;; This file is not part of GNU Emacs. +;; +;;; License: +;; +;; This file is part of Smartparens. +;; +;; Smartparens 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. +;; +;; Smartparens 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 Smartparens. If not, see . +;; +;;; Commentary: +;; +;; This file configuation to make smartparens insertion behavae similarly to +;; SublimeText editor. To use it, simply add: +;; +;; (require 'sp-sublimetext-like) +;; +;; into your configuration. You can use this in conjunction with the +;; default config or your own configuration. +;; +;;; Code: + +(require 'smartparens) + +(defun sp-point-not-before-word (_ action __) + "In insert and autoskip actions returns t when next symbol is +not a word constituent." + (if (memq action '(insert autoskip)) + (looking-at "\\(\\Sw\\|$\\)") + t)) + +(let ((when '(sp-point-not-before-word)) + (actions '(insert wrap autoskip navigate))) + (sp-pair "{" "}" :when when :actions actions) + (sp-pair "[" "]" :when when :actions actions) + (sp-pair "(" ")" :when when :actions actions)) + +(provide 'sp-sublimetext-like) + +;;; sp-sublimetext-like.el ends here -- 2.47.3