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#24255: 25.1; incorrect edebug spec for cl-defun Date: Fri, 06 Oct 2017 11:07:04 -0700 Message-ID: <874lrc5ewn.fsf@runbox.com> References: <5cb85917-ccd6-0807-112d-8df7972194cd@acm.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1507313292 896 195.159.176.226 (6 Oct 2017 18:08:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Oct 2017 18:08:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: 24255@debbugs.gnu.org To: Ben Liblit Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 06 20:08:08 2017 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 1e0X2d-00084F-Ml for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Oct 2017 20:08:07 +0200 Original-Received: from localhost ([::1]:46661 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0X2j-0007Fc-Vp for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Oct 2017 14:08:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0X2d-0007FS-NZ for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2017 14:08:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0X2Y-00022V-O4 for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2017 14:08:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44851) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0X2Y-000216-8p for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2017 14:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e0X2X-0008HW-Ra for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2017 14:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gemini Lasswell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Oct 2017 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24255 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24255-submit@debbugs.gnu.org id=B24255.150731325831793 (code B ref 24255); Fri, 06 Oct 2017 18:08:01 +0000 Original-Received: (at 24255) by debbugs.gnu.org; 6 Oct 2017 18:07:38 +0000 Original-Received: from localhost ([127.0.0.1]:53531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0X29-0008Gj-Sl for submit@debbugs.gnu.org; Fri, 06 Oct 2017 14:07:38 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:44226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0X27-0008GY-S5 for 24255@debbugs.gnu.org; Fri, 06 Oct 2017 14:07:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=9cYrDOeFz/co1OVq9IvcRp1Mj7/cm+qInKKj5XhQqcU=; b=o56obCQ5KYdpawcO1FCF/2nZD7 jisVeLSjhBrGSZviwyscA1n2Q192Y0O8pPV/2wEy5KiAm8CIICSTuGPVc9+mHfQzNSK8wig+Z0eg9 M+8Mcwzjbhoqg17fjY0V08Cwr1TzIkFXXAG/IWEyP72Aol+aOC+QODPKhRVpZX8C0fsG13GiR9zrt ubWEz8pBqZJ0yO9dTf2KEukmmNKU11VOYQqUJC+zfzCL3howzRIbWtgtbKbWjR35Dlp0/cvp8HPK6 NMRC2nCwwvKlGSeijcAUAMBY3CnKcgIFxkXoDtxYttV14Ho440pe8p/87xVWZoZzSYTgBpt+WTQf8 hSVXEEoQ==; Original-Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1e0X25-00077l-Vd; Fri, 06 Oct 2017 20:07:34 +0200 Original-Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=chinook) by mailfront11.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1e0X1e-0001pL-Nt; Fri, 06 Oct 2017 20:07:07 +0200 In-Reply-To: <5cb85917-ccd6-0807-112d-8df7972194cd@acm.org> (Ben Liblit's message of "Wed, 17 Aug 2016 15:15:20 -0500") 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:138019 Archived-At: --=-=-= Content-Type: text/plain Here is a revised Edebug spec for cl-defun which supports destructuring. I've included dotted destructuring since cl-defun supports it, even though Edebug doesn't currently handle dotted destructuring correctly due to bug#6415. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=0001-Fix-Edebug-spec-for-cl-defun-bug-24255.patch >From 09ff5fa398bc1061fd5a8ee1bb880f2d6f8035ba Mon Sep 17 00:00:00 2001 From: Gemini Lasswell Date: Fri, 6 Oct 2017 09:55:55 -0700 Subject: [PATCH] Fix Edebug spec for cl-defun (bug#24255) * lisp/emacs-lisp/cl-macs.el: Modify the Edebug spec for `cl-lambda-list' to support destructuring argument lists. (cl-defun, cl-defmacro): Fix spelling errors in docstrings. * lisp/textmodes/rst.el: Remove alternate version of Edebug specs for `cl-lambda-list' and `cl-type-spec'. --- lisp/emacs-lisp/cl-macs.el | 32 +++++++++++++++++++++++--------- lisp/textmodes/rst.el | 16 ---------------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 32ba0ac309..cb4c7ad93c 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -193,20 +193,34 @@ cl-declarations-or-string (&or stringp cl-declarations)) (def-edebug-spec cl-lambda-list - (([&rest arg] + (([&rest cl-lambda-arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] - [&optional ["&rest" arg]] + [&optional ["&rest" cl-lambda-arg]] [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest &or (symbolp &optional def-form) symbolp]] - ))) + . [&or arg nil]))) (def-edebug-spec cl-&optional-arg - (&or (arg &optional def-form arg) arg)) + (&or (cl-lambda-arg &optional def-form arg) arg)) (def-edebug-spec cl-&key-arg - (&or ([&or (symbolp arg) arg] &optional def-form arg) arg)) + (&or ([&or (symbolp cl-lambda-arg) arg] &optional def-form arg) arg)) + +(def-edebug-spec cl-lambda-arg + (&or arg cl-lambda-list1)) + +(def-edebug-spec cl-lambda-list1 + (([&optional ["&whole" arg]] ;; only allowed at lower levels + [&rest cl-lambda-arg] + [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] + [&optional ["&rest" cl-lambda-arg]] + [&optional ["&key" cl-&key-arg &rest cl-&key-arg + &optional "&allow-other-keys"]] + [&optional ["&aux" &rest + &or (symbolp &optional def-form) symbolp]] + . [&or arg nil]))) (def-edebug-spec cl-type-spec sexp) @@ -336,8 +350,8 @@ cl-defun [&key (([KEYWORD] VAR) [INITFORM [SVAR]])... [&allow-other-keys]] [&aux (VAR [INITFORM])...]) -VAR maybe be replaced recursively with an argument list for -destructing, `&whole' is supported within these sublists. If +VAR may be replaced recursively with an argument list for +destructuring, `&whole' is supported within these sublists. If SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be written simply `VAR'. See the Info node `(cl)Argument Lists' for more details. @@ -430,8 +444,8 @@ cl-defmacro [&aux (VAR [INITFORM])...] [&environment VAR]) -VAR maybe be replaced recursively with an argument list for -destructing, `&whole' is supported within these sublists. If +VAR may be replaced recursively with an argument list for +destructuring, `&whole' is supported within these sublists. If SVAR, INITFORM, and KEYWORD are all omitted, then `(VAR)' may be written simply `VAR'. See the Info node `(cl)Argument Lists' for more details. diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 5534294738..404b8eb04d 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -109,22 +109,6 @@ (def-edebug-spec push (&or [form symbolp] [form gv-place])) -;; Correct wrong declaration. This still doesn't support dotted destructuring -;; though. -(def-edebug-spec cl-lambda-list - (([&rest cl-macro-arg] - [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] - [&optional ["&rest" arg]] - [&optional ["&key" [cl-&key-arg &rest cl-&key-arg] - &optional "&allow-other-keys"]] - [&optional ["&aux" &rest - &or (symbolp &optional def-form) symbolp]] - ))) - -;; Add missing declaration. -(def-edebug-spec cl-type-spec sexp) ;; This is not exactly correct but good - ;; enough. - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Support for `testcover' -- 2.14.1 --=-=-=--