unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Mark Oteiza <mvoteiza@udel.edu>
To: Gemini Lasswell <gazally@runbox.com>
Cc: 24762@debbugs.gnu.org
Subject: bug#24762: 26.0.50; Spurious &optional in lisp/progmodes/python.el causes Edebug error
Date: Wed, 16 Nov 2016 14:41:19 -0500	[thread overview]
Message-ID: <871sybw6u8.fsf@udel.edu> (raw)
In-Reply-To: <m237jpv31v.fsf@rainbow.local> (Gemini Lasswell's message of "Fri, 21 Oct 2016 13:51:24 -0700")

Gemini Lasswell <gazally@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: "





  reply	other threads:[~2016-11-16 19:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 20:51 bug#24762: 26.0.50; Spurious &optional in lisp/progmodes/python.el causes Edebug error Gemini Lasswell
2016-11-16 19:41 ` Mark Oteiza [this message]
2016-11-16 23:53   ` Clément Pit--Claudel
2016-12-01  0:42   ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871sybw6u8.fsf@udel.edu \
    --to=mvoteiza@udel.edu \
    --cc=24762@debbugs.gnu.org \
    --cc=gazally@runbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).