Subject: pcase spams me with useless and cryptic messages intended for internal use

From: Paul Pogonyshev <[email-masked]>
Date: Sun, 19 Mar 2017 22:54:43 +0100

To reproduce, evaluate this:

(defmacro kek (&rest more-cases)
  `(pcase it
     (`foo 1)
     ,@more-cases))

(defun lol (x)
  (--each x
    (kek))
  (--each x
    (kek (`baz 3))))

Observe that there is "pcase-memoize: equal first branch, yet
different" gibberish in *Messages* buffer.

Attached patch comments out this debug output.
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 289265abf2..fc5474ecc4 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -175,8 +175,8 @@ Emacs Lisp manual for more information and examples."
       ;; (when (gethash (car cases) pcase--memoize-2)
       ;;   (message "pcase-memoize failed because of eq test on %S"
       ;;            (car cases)))
-      (when data
-        (message "pcase-memoize: equal first branch, yet different"))
+      ;; (when data
+      ;;   (message "pcase-memoize: equal first branch, yet different"))
       (let ((expansion (pcase--expand exp cases)))
         (puthash (car cases) `(,exp ,cases ,@expansion) pcase--memoize)
         ;; (puthash (car cases) `(,exp ,cases ,@expansion) pcase--memoize-1)