From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gemini Lasswell Newsgroups: gmane.emacs.bugs Subject: bug#24717: 26.0.50; invalid-read-syntax error using Edebug on lisp/emacs-lisp/pcase.el Date: Mon, 17 Oct 2016 08:44:58 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1476719782 14196 195.159.176.226 (17 Oct 2016 15:56:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Oct 2016 15:56:22 +0000 (UTC) To: 24717@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 17 17:56:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwAGm-0002Ak-HD for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Oct 2016 17:56:08 +0200 Original-Received: from localhost ([::1]:34037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwAGo-00087v-Lf for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Oct 2016 11:56:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwA75-0006Bp-RC for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:46:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwA70-0001rA-VT for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:46:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58984) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwA70-0001qy-RS for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bwA70-0006Tm-Ii for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2016 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24717 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147671913824865 (code B ref -1); Mon, 17 Oct 2016 15:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Oct 2016 15:45:38 +0000 Original-Received: from localhost ([127.0.0.1]:36941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwA6b-0006Sz-Q2 for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwA6a-0006Sm-WC for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwA6S-0001eU-04 for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:31 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41038) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwA6R-0001eL-Td for submit@debbugs.gnu.org; Mon, 17 Oct 2016 11:45:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwA6Q-0005UA-QX for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:45:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwA6L-0001cA-Uf for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:45:26 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:37285) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwA6L-0001bs-O5 for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 11:45:21 -0400 Original-Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1bwA6J-00080i-Qu for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 17:45:20 +0200 Original-Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=rainbow.local) by mailfront10.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1bwA61-0004g4-Ed for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2016 17:45:01 +0200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124589 Archived-At: To reproduce, start at the top of your Emacs source tree and: 1. emacs -Q 2. M-x edebug-all-defs RET 3. C-x C-f lisp/emacs-lisp/pcase.el 4. M-x eval-buffer RET The reason this is happening is that in this line: (def-edebug-spec pcase-MACRO pcase--edebug-match-macro) pcase--edebug-match-macro does not have an Edebug specification, so the Edebug specification for def-edebug-spec fails to match. But when you aren't trying to debug pcase.el and are instead trying to debug something that uses pcase, this Edebug specification works, because internally to Edebug when it is trying to match an Edebug specification, if it finds a symbol without a specification it assumes it is one of Edebug's match functions and calls it. This is how Edebug implements the behavior for the symbols used in Edebug specifications. And pcase--edebug-match-macro works like one of Edebug's match functions. I think it's a rather poor idea for pcase.el to depend on internal implementation details of Edebug. But since it does, replacing the line of code above with: (put 'pcase-MACRO 'edebug-form-spec 'pcase--edebug-match-macro) would make it more obvious that it's using internal implementation details of Edebug, as well as fixing the syntax error.