summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/pcase.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-12-12 14:22:58 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2020-12-12 14:22:58 +0100
commit4afef614cd6c93b4d4a57aa5bb211563649abc56 (patch)
treeac7bd8ec3cf8982cf1500ec3c58a9350dcba68c4 /lisp/emacs-lisp/pcase.el
parent9a7bce6241f5fc9ed982e95084641f3021314829 (diff)
downloademacs-4afef614cd6c93b4d4a57aa5bb211563649abc56.tar.gz
Alter the "Redundant pcase patter" warning message
* lisp/emacs-lisp/pcase.el (pcase--expand): Make the "Redundant pcase pattern" warning less vague (bug#31350).
Diffstat (limited to 'lisp/emacs-lisp/pcase.el')
-rw-r--r--lisp/emacs-lisp/pcase.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index e603900b095..206f0dd1a9d 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -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)