summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/pcase.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2022-01-22 17:41:03 +0000
committerAlan Mackenzie <acm@muc.de>2022-01-22 17:41:03 +0000
commit88e1f8b02086aaf652e3058b36b7612c073c04b3 (patch)
tree0a12af666638c4629e2b0c34bcce1cad9945930e /lisp/emacs-lisp/pcase.el
parent1edde2fc7a1a82b0e65d2b7a4237e7c18d0bc0c1 (diff)
parent14d64a8adcc866deecd758b898e8ef2d836b354a (diff)
downloademacs-88e1f8b02086aaf652e3058b36b7612c073c04b3.tar.gz
emacs-88e1f8b02086aaf652e3058b36b7612c073c04b3.tar.bz2
emacs-88e1f8b02086aaf652e3058b36b7612c073c04b3.zip
Merge branch 'scratch/correct-warning-pos'
Diffstat (limited to 'lisp/emacs-lisp/pcase.el')
-rw-r--r--lisp/emacs-lisp/pcase.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 7a82b416e55..c3dbfe29473 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -433,6 +433,7 @@ how many time this CODEGEN is called."
(memq (car case) pcase--dontwarn-upats))
(setq main
(macroexp-warn-and-return
+ (car case)
(format "pcase pattern %S shadowed by previous pcase pattern"
(car case))
main))))
@@ -940,6 +941,7 @@ Otherwise, it defers to REST which is a list of branches of the form
(let ((code (pcase--u1 matches code vars rest)))
(if (eq upat '_) code
(macroexp-warn-and-return
+ upat
"Pattern t is deprecated. Use `_' instead"
code))))
((eq upat 'pcase--dontcare) :pcase--dontcare)