summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/ert.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-01-16 10:15:47 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-01-16 14:21:57 -0500
commit0ab56a4e935b3aa759229923804ba33c841f425c (patch)
tree5657e2c4db800dd0c9cc88550b9955bbe132c66f /lisp/emacs-lisp/ert.el
parentdf34ed8cbfdcf4584aa0ebfe827fac3a8d932bb6 (diff)
downloademacs-0ab56a4e935b3aa759229923804ba33c841f425c.tar.gz
emacs-0ab56a4e935b3aa759229923804ba33c841f425c.tar.bz2
emacs-0ab56a4e935b3aa759229923804ba33c841f425c.zip
* lisp/emacs-lisp/pcase.el: Add support for `not` to `pred`
(pcase--split-pred, pcase--funcall): Adjust for `not`. (pcase--get-macroexpander): New function. (pcase--edebug-match-macro, pcase--make-docstring) (pcase--macroexpand): Use it. * lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Use it! * doc/lispref/control.texi (The @code{pcase} macro): Document it. * lisp/emacs-lisp/ert.el (ert--explain-equal-rec): Remove redundant test.
Diffstat (limited to 'lisp/emacs-lisp/ert.el')
-rw-r--r--lisp/emacs-lisp/ert.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 58517549454..fdbf95319ff 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -487,7 +487,7 @@ Errors during evaluation are caught and handled like nil."
Returns nil if they are."
(if (not (eq (type-of a) (type-of b)))
`(different-types ,a ,b)
- (pcase-exhaustive a
+ (pcase a
((pred consp)
(let ((a-length (proper-list-p a))
(b-length (proper-list-p b)))
@@ -538,7 +538,7 @@ Returns nil if they are."
for xi = (ert--explain-equal-rec ai bi)
do (when xi (cl-return `(array-elt ,i ,xi)))
finally (cl-assert (equal a b) t))))
- ((pred atom)
+ (_
(if (not (equal a b))
(if (and (symbolp a) (symbolp b) (string= a b))
`(different-symbols-with-the-same-name ,a ,b)