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#24779: 26.0.50; Incorrect Edebug spec for define-skeleton Date: Sat, 27 Jul 2019 15:15:22 +0200 Message-ID: <87v9vnhb4l.fsf@mouse.gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="218404"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 24779@debbugs.gnu.org To: Gemini Lasswell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 27 15:16:11 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 1hrMYV-000ugH-0Q for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2019 15:16:11 +0200 Original-Received: from localhost ([::1]:45776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrMYS-0007Bp-Fn for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2019 09:16:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59474) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrMYO-0007Bd-UW for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 09:16:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrMYN-0001TI-LK for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 09:16:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35058) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrMYL-0001SY-VN for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 09:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hrMYL-0002Q6-Qa for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 09:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jul 2019 13:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24779 X-GNU-PR-Package: emacs Original-Received: via spool by 24779-submit@debbugs.gnu.org id=B24779.15642333299232 (code B ref 24779); Sat, 27 Jul 2019 13:16:01 +0000 Original-Received: (at 24779) by debbugs.gnu.org; 27 Jul 2019 13:15:29 +0000 Original-Received: from localhost ([127.0.0.1]:43876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrMXp-0002Op-5Q for submit@debbugs.gnu.org; Sat, 27 Jul 2019 09:15:29 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:38130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrMXm-0002Of-HD for 24779@debbugs.gnu.org; Sat, 27 Jul 2019 09:15:27 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrMXi-0000v6-UX; Sat, 27 Jul 2019 15:15:25 +0200 In-Reply-To: (Gemini Lasswell's message of "Sun, 23 Oct 2016 13:37:32 -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:163863 Archived-At: Gemini Lasswell writes: > Edebug fails to instrument a large number of the skeletons included in > Emacs, and some of those which it succeeds in instrumenting do not work > under the debugger. I have not tried every skeleton in Emacs, but among > those I tried which had problems are sgml-tag, rul-if, rul-function, > m2-begin, sh-case, and texinfo-insert-quotation. > > To reproduce this behavior using the skeletons in ada-stmt.el, start > Emacs, with -Q or otherwise, and open lisp/progmodes/ada-stmt.el from > the Emacs source tree. Then: > > C-s ada-array RET > C-u C-M-x > > Result: Invalid read syntax: "Head of list form must be a symbol or > lambda expression" (define-skeleton ada-array "Insert array type definition. Prompt for component type and index subtypes." () "array (" ("index definition: " str ", " ) -2 ") of " _ ?\;) It's complaining about "index definition", which is indeed not a string. The following patch fixes this, but I have no idea what's intended here: diff --git a/lisp/skeleton.el b/lisp/skeleton.el index bce73d6bfe..6a8ec7993a 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -105,7 +105,7 @@ skeleton-point (defvar skeleton-regions) (def-edebug-spec skeleton-edebug-spec - ([&or null stringp (stringp &rest stringp) [[¬ atom] def-form]] + ([&or null stringp (stringp &rest stringp) [[¬ atom] sexp]] &rest &or "n" "_" "-" ">" "@" "&" "!" "resume:" ("quote" def-form) skeleton-edebug-spec def-form)) ;;;###autoload > To reproduce an example of a skeleton that can be instrumented but then > produces an error while debugging, continue with: > > C-s ada-declare-block RET > C-u C-M-x > C-x b ada RET > M-x ada-mode RET > M-x ada-declare-block RET > g g Foo RET g g g > > Result: Symbol's value as variable is void: | I'm able to reproduce that, too, and adding "|" to the list of strings in the spec seems to fix this. I know nothing about any of this, though, so... Is this the right thing to do? diff --git a/lisp/skeleton.el b/lisp/skeleton.el index bce73d6bfe..67fc4aae15 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -105,8 +105,8 @@ skeleton-point (defvar skeleton-regions) (def-edebug-spec skeleton-edebug-spec - ([&or null stringp (stringp &rest stringp) [[¬ atom] def-form]] - &rest &or "n" "_" "-" ">" "@" "&" "!" "resume:" + ([&or null stringp (stringp &rest stringp) [[¬ atom] sexp]] + &rest &or "n" "_" "-" ">" "@" "&" "!" "|" "resume:" ("quote" def-form) skeleton-edebug-spec def-form)) ;;;###autoload (defmacro define-skeleton (command documentation &rest skeleton) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no