Fix quote simplification in docs

* dev/examples-to-docs.el (simplify-quotes):
* dev/examples-to-info.el (simplify-quotes):
Also replace 'nil with '().

* README.md:
* dash.info:
* dash.texi: Regenerate docs.
master
Basil L. Contovounesios 7 years ago
parent ad21e133b9
commit 7854ec7141
No known key found for this signature in database
GPG Key ID: 205AB54A5D5D8CFF
  1. 15
      README.md
  2. 86
      dash.info
  3. 18
      dash.texi
  4. 4
      dev/examples-to-docs.el
  5. 4
      dev/examples-to-info.el

@ -1417,9 +1417,9 @@ other value (the body).
Partition directly after each time `pred` is true on an element of `list`.
```el
(-partition-after-pred (function oddp) '()) ;; => '()
(-partition-after-pred (function oddp) '(1)) ;; => '((1))
(-partition-after-pred (function oddp) '(0 1)) ;; => '((0 1))
(-partition-after-pred #'oddp '()) ;; => '()
(-partition-after-pred #'oddp '(1)) ;; => '((1))
(-partition-after-pred #'oddp '(0 1)) ;; => '((0 1))
```
#### -partition-before-pred `(pred list)`
@ -1427,9 +1427,9 @@ Partition directly after each time `pred` is true on an element of `list`.
Partition directly before each time `pred` is true on an element of `list`.
```el
(-partition-before-pred (function oddp) '()) ;; => '()
(-partition-before-pred (function oddp) '(1)) ;; => '((1))
(-partition-before-pred (function oddp) '(0 1)) ;; => '((0) (1))
(-partition-before-pred #'oddp '()) ;; => '()
(-partition-before-pred #'oddp '(1)) ;; => '((1))
(-partition-before-pred #'oddp '(0 1)) ;; => '((0) (1))
```
#### -partition-before-item `(item list)`
@ -1625,6 +1625,7 @@ Alias: `-uniq`
```el
(-distinct '()) ;; => '()
(-distinct '(1 2 2 4)) ;; => '(1 2 4)
(-distinct '(t t t)) ;; => '(t)
```
@ -2680,7 +2681,7 @@ expects a list with n items as arguments
```el
(-map (-applify '+) '((1 1 1) (1 2 3) (5 5 5))) ;; => '(3 6 15)
(-map (-applify (lambda (a b c) (\` ((\, a) ((\, b) ((\, c))))))) '((1 1 1) (1 2 3) (5 5 5))) ;; => '((1 (1 (1))) (1 (2 (3))) (5 (5 (5))))
(-map (-applify (lambda (a b c) `(,a (,b (,c))))) '((1 1 1) (1 2 3) (5 5 5))) ;; => '((1 (1 (1))) (1 (2 (3))) (5 (5 (5))))
(funcall (-applify '<) '(3 6)) ;; => t
```

@ -1,4 +1,4 @@
This is dash.info, produced by makeinfo version 6.5 from dash.texi.
This is dash.info, produced by makeinfo version 6.6 from dash.texi.
This manual is for ‘dash.el’ version 2.12.1.
@ -1322,22 +1322,22 @@ Functions partitioning the input list into a list of lists.
Partition directly after each time PRED is true on an element of
LIST.
(-partition-after-pred (function oddp) '())
(-partition-after-pred #'oddp '())
⇒ '()
(-partition-after-pred (function oddp) '(1))
(-partition-after-pred #'oddp '(1))
⇒ '((1))
(-partition-after-pred (function oddp) '(0 1))
(-partition-after-pred #'oddp '(0 1))
⇒ '((0 1))
-- Function: -partition-before-pred (pred list)
Partition directly before each time PRED is true on an element of
LIST.
(-partition-before-pred (function oddp) '())
(-partition-before-pred #'oddp '())
⇒ '()
(-partition-before-pred (function oddp) '(1))
(-partition-before-pred #'oddp '(1))
⇒ '((1))
(-partition-before-pred (function oddp) '(0 1))
(-partition-before-pred #'oddp '(0 1))
⇒ '((0) (1))
-- Function: -partition-before-item (item list)
@ -1535,6 +1535,8 @@ Operations pretending lists are sets.
⇒ '()
(-distinct '(1 2 2 4))
⇒ '(1 2 4)
(-distinct '(t t t))
⇒ '(t)

File: dash.info, Node: Other list operations, Next: Tree operations, Prev: Set operations, Up: Functions
@ -2597,7 +2599,7 @@ offered in a separate package: ‘dash-functional‘.
(-map (-applify '+) '((1 1 1) (1 2 3) (5 5 5)))
⇒ '(3 6 15)
(-map (-applify (lambda (a b c) (\` ((\, a) ((\, b) ((\, c))))))) '((1 1 1) (1 2 3) (5 5 5)))
(-map (-applify (lambda (a b c) `(,a (,b (,c))))) '((1 1 1) (1 2 3) (5 5 5)))
⇒ '((1 (1 (1))) (1 (2 (3))) (5 (5 (5))))
(funcall (-applify '<) '(3 6))
⇒ t
@ -3277,25 +3279,25 @@ Ref: -partition-all-in-steps41195
Ref: -partition-by41680
Ref: -partition-by-header42062
Ref: -partition-after-pred42666
Ref: -partition-before-pred43037
Ref: -partition-before-item43415
Ref: -partition-after-item43726
Ref: -group-by44032
Node: Indexing44469
Ref: -elem-index44671
Ref: -elem-indices45066
Ref: -find-index45449
Ref: -find-last-index45938
Ref: -find-indices46442
Ref: -grade-up46850
Ref: -grade-down47253
Node: Set operations47663
Ref: -union47846
Ref: -difference48288
Ref: -intersection48705
Ref: -powerset49142
Ref: -permutations49355
Ref: -distinct49655
Ref: -partition-before-pred43010
Ref: -partition-before-item43361
Ref: -partition-after-item43672
Ref: -group-by43978
Node: Indexing44415
Ref: -elem-index44617
Ref: -elem-indices45012
Ref: -find-index45395
Ref: -find-last-index45884
Ref: -find-indices46388
Ref: -grade-up46796
Ref: -grade-down47199
Node: Set operations47609
Ref: -union47792
Ref: -difference48234
Ref: -intersection48651
Ref: -powerset49088
Ref: -permutations49301
Ref: -distinct49601
Node: Other list operations49979
Ref: -rotate50204
Ref: -repeat50574
@ -3368,21 +3370,21 @@ Ref: -rpartial86761
Ref: -juxt87163
Ref: -compose87595
Ref: -applify88153
Ref: -on88600
Ref: -flip89126
Ref: -const89438
Ref: -cut89782
Ref: -not90268
Ref: -orfn90578
Ref: -andfn91012
Ref: -iteratefn91507
Ref: -fixfn92210
Ref: -prodfn93779
Node: Development94848
Node: Contribute95197
Node: Changes95945
Node: Contributors98944
Node: Index100568
Ref: -on88584
Ref: -flip89110
Ref: -const89422
Ref: -cut89766
Ref: -not90252
Ref: -orfn90562
Ref: -andfn90996
Ref: -iteratefn91491
Ref: -fixfn92194
Ref: -prodfn93763
Node: Development94832
Node: Contribute95181
Node: Changes95929
Node: Contributors98928
Node: Index100552

End Tag Table

@ -2067,15 +2067,15 @@ Partition directly after each time @var{pred} is true on an element of @var{list
@example
@group
(-partition-after-pred (function oddp) '())
(-partition-after-pred #'oddp '())
@result{} '()
@end group
@group
(-partition-after-pred (function oddp) '(1))
(-partition-after-pred #'oddp '(1))
@result{} '((1))
@end group
@group
(-partition-after-pred (function oddp) '(0 1))
(-partition-after-pred #'oddp '(0 1))
@result{} '((0 1))
@end group
@end example
@ -2087,15 +2087,15 @@ Partition directly before each time @var{pred} is true on an element of @var{lis
@example
@group
(-partition-before-pred (function oddp) '())
(-partition-before-pred #'oddp '())
@result{} '()
@end group
@group
(-partition-before-pred (function oddp) '(1))
(-partition-before-pred #'oddp '(1))
@result{} '((1))
@end group
@group
(-partition-before-pred (function oddp) '(0 1))
(-partition-before-pred #'oddp '(0 1))
@result{} '((0) (1))
@end group
@end example
@ -2445,6 +2445,10 @@ Alias: @code{-uniq}
(-distinct '(1 2 2 4))
@result{} '(1 2 4)
@end group
@group
(-distinct '(t t t))
@result{} '(t)
@end group
@end example
@end defun
@ -4082,7 +4086,7 @@ expects a list with n items as arguments
@result{} '(3 6 15)
@end group
@group
(-map (-applify (lambda (a b c) (\` ((\, a) ((\, b) ((\, c))))))) '((1 1 1) (1 2 3) (5 5 5)))
(-map (-applify (lambda (a b c) `(,a (,b (,c))))) '((1 1 1) (1 2 3) (5 5 5)))
@result{} '((1 (1 (1))) (1 (2 (3))) (5 (5 (5))))
@end group
@group

@ -153,8 +153,8 @@ FUNCTION may reference an elisp function, alias, macro or a subr."
(defun simplify-quotes ()
(goto-char (point-min))
(while (search-forward "(quote nil)" nil t)
(replace-match "'()"))
(while (re-search-forward (rx (or "'nil" "(quote nil)")) nil t)
(replace-match "'()" t t))
(goto-char (point-min))
(while (search-forward "(quote " nil t)
(forward-char -7)

@ -159,8 +159,8 @@ FUNCTION may reference an elisp function, alias, macro or a subr."
(defun simplify-quotes ()
(goto-char (point-min))
(while (search-forward "(quote nil)" nil t)
(replace-match "'()"))
(while (re-search-forward (rx (or "'nil" "(quote nil)")) nil t)
(replace-match "'()" t t))
(goto-char (point-min))
(while (search-forward "(quote " nil t)
(forward-char -7)

Loading…
Cancel
Save