GNU bug report logs - #24762
26.0.50; Spurious &optional in lisp/progmodes/python.el causes Edebug error

Previous Next

Package: emacs;

Reported by: Gemini Lasswell <gazally <at> runbox.com>

Date: Fri, 21 Oct 2016 20:52:01 UTC

Severity: normal

Tags: fixed

Found in version 26.0.50

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #8 received at 24762 <at> debbugs.gnu.org (full text, mbox):

From: Mark Oteiza <mvoteiza <at> udel.edu>
To: Gemini Lasswell <gazally <at> runbox.com>
Cc: 24762 <at> debbugs.gnu.org
Subject: Re: bug#24762: 26.0.50;
 Spurious &optional in lisp/progmodes/python.el causes Edebug error
Date: Wed, 16 Nov 2016 14:41:19 -0500
Gemini Lasswell <gazally <at> runbox.com> writes:

> There's an &optional followed by &rest instead of a parameter name in
> python-define-auxiliary-skeleton in lisp/progmodes/python.el. This
> doesn't work with defmacro's Edebug spec and prevents use of Edebug on
> the macro and testcover-start on the file.
>
> To repro:
> 1. start Emacs at the top of its source tree, with -Q if you like
> 2. C-x C-f lisp/progmodes/python.el RET
> 3. C-s &optional &r RET
> 4. C-u C-M-x
>
> Result: Invalid read syntax: "Bad argument:", &rest

Thanks for reporting--it looks to me like the following fixes:

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f9b28c3..9cd9cc8 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -4040,7 +4040,7 @@ 'python-mode-abbrev-table
   "Abbrev table for Python mode."
   :parents (list python-mode-skeleton-abbrev-table))
 
-(defmacro python-define-auxiliary-skeleton (name doc &optional &rest skel)
+(defmacro python-define-auxiliary-skeleton (name &optional doc &rest skel)
   "Define a `python-mode' auxiliary skeleton using NAME DOC and SKEL.
 The skeleton will be bound to python-skeleton-NAME."
   (declare (indent 2))
@@ -4060,11 +4060,11 @@ python-define-auxiliary-skeleton
          (signal 'quit t))
        ,@skel)))
 
-(python-define-auxiliary-skeleton else nil)
+(python-define-auxiliary-skeleton else)
 
-(python-define-auxiliary-skeleton except nil)
+(python-define-auxiliary-skeleton except)
 
-(python-define-auxiliary-skeleton finally nil)
+(python-define-auxiliary-skeleton finally)
 
 (python-skeleton-define if nil
   "Condition: "




This bug report was last modified 8 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.