From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#30910: 26.0.91; Incorrect Edebug spec for def-edebug-spec Date: Thu, 18 Jul 2019 15:03:26 +0200 Message-ID: <87h87j8pgh.fsf@mouse.gnus.org> References: <87h8p76fz2.fsf@runbox.com> <87v9w4zopq.fsf@mouse.gnus.org> <87pnmbort7.fsf@runbox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="30819"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 30910@debbugs.gnu.org To: Gemini Lasswell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 18 15:04:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ho64y-0007kH-O9 for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Jul 2019 15:04:12 +0200 Original-Received: from localhost ([::1]:37818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho64x-0007il-QD for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Jul 2019 09:04:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54044) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ho64t-0007iB-BW for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2019 09:04:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ho64r-00025x-Cu for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2019 09:04:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44771) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ho64q-00025B-Or for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2019 09:04:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ho64q-0008O5-FU for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2019 09:04:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jul 2019 13:04:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30910 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 30910-submit@debbugs.gnu.org id=B30910.156345501532205 (code B ref 30910); Thu, 18 Jul 2019 13:04:04 +0000 Original-Received: (at 30910) by debbugs.gnu.org; 18 Jul 2019 13:03:35 +0000 Original-Received: from localhost ([127.0.0.1]:53592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ho64M-0008NM-OP for submit@debbugs.gnu.org; Thu, 18 Jul 2019 09:03:35 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:36594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ho64K-0008NA-Pm for 30910@debbugs.gnu.org; Thu, 18 Jul 2019 09:03:33 -0400 Original-Received: from [80.169.244.84] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ho64F-0006Xm-Hx; Thu, 18 Jul 2019 15:03:31 +0200 In-Reply-To: <87pnmbort7.fsf@runbox.com> (Gemini Lasswell's message of "Mon, 15 Jul 2019 15:29:08 -0700") 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: 209.51.188.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:163299 Archived-At: Gemini Lasswell writes: > Lars Ingebrigtsen writes: > >> But you say that it has an edebug spec, but: >> >> (symbol-plist 'def-edebug-spec) >> => nil > > Do (require 'edebug) first, then that will work. Ah, right: (symbol-plist 'def-edebug-spec) => (edebug-form-spec (&define :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec))) >> I thought that perhaps saying something like >> >> (eval-and-compile >> (put 'def-edebug-spec 'edebug-form-spec '(sexp sexp))) >> >> might be a fix, but it doesn't seem to have any effect... > > (def-edebug-spec def-edebug-spec (&rest sexp)) > > would be a fix, but so would be deleting it entirely. Yeah, I guess. > Since there is no code needing to be debugged inside of an Edebug spec, > the only reason I can think of for having an Edebug spec for > def-edebug-spec is to check whether the specs defined with it are > validly formed. The error messages issued during Edebug spec matching > are not very good, but maybe someone will be inspired to do something > about that someday. The current spec was added with this helpful commit message: commit 1fe3d50701adcd8929745edf24158a4a50459ea0 Author: Daniel LaLiberte Date: Thu Mar 24 20:38:34 1994 +0000 New version from author. And this is the code, that has gone virtually unchanged since 1994. Note the "Out of date" comment, which was there in 1994: ;;;;* Spec for def-edebug-spec ;;; Out of date. (defun edebug-spec-p (object) "Return non-nil if OBJECT is a symbol with an edebug-form-spec property." (and (symbolp object) (get object 'edebug-form-spec))) (def-edebug-spec def-edebug-spec ;; Top level is different from lower levels. (&define :name edebug-spec name &or "nil" edebug-spec-p "t" "0" (&rest edebug-spec))) (def-edebug-spec edebug-spec-list ;; A list must have something in it, or it is nil, a symbolp ((edebug-spec . [&or nil edebug-spec]))) (def-edebug-spec edebug-spec (&or (vector &rest edebug-spec) ; matches a vector ("vector" &rest edebug-spec) ; matches a vector spec ("quote" symbolp) edebug-spec-list stringp [edebug-lambda-list-keywordp &rest edebug-spec] [keywordp gate edebug-spec] edebug-spec-p ;; Including all the special ones e.g. form. symbolp;; a predicate )) So it does sound more like a test for whether the specs are well-formed, and not really... anything with edebug proper? > Right now the only Edebug specs that get matched to the def-edebug-spec > definition are the ones declared with def-edebug-spec, not the ones in > macro definitions, because: > > (get-edebug-spec 'defmacro) > => (&define name lambda-list lambda-doc > [&optional > ("declare" &rest sexp)] > def-body) > > If we had a Edebug spec for Edebug specs that wasn't broken, we could > change the defmacro spec to use it, and see what happens. Right. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no