Alter the "Redundant pcase patter" warning message

* lisp/emacs-lisp/pcase.el (pcase--expand): Make the "Redundant
pcase pattern" warning less vague (bug#31350).
This commit is contained in:
Lars Ingebrigtsen 2020-12-12 14:22:58 +01:00
parent 9a7bce6241
commit 4afef614cd

View file

@ -409,7 +409,8 @@ of the elements of LIST is performed as if by `pcase-let'.
(dolist (case cases)
(unless (or (memq case used-cases)
(memq (car case) pcase--dontwarn-upats))
(message "Redundant pcase pattern: %S" (car case))))
(message "pcase pattern %S shadowed by previous pcase pattern"
(car case))))
(macroexp-let* defs main))))
(defun pcase--macroexpand (pat)