unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit--Claudel" <clement.pit@gmail.com>
To: 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 18:53:16 -0500	[thread overview]
Message-ID: <ff4653ad-03aa-f973-e7bc-c2dd7cf2298b@gmail.com> (raw)
In-Reply-To: <871sybw6u8.fsf@udel.edu>


[-- Attachment #1.1: Type: text/plain, Size: 1809 bytes --]

LGTM :)

On 2016-11-16 14:41, Mark Oteiza wrote:
> 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: "
> 
> 
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-11-16 23:53 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
2016-11-16 23:53   ` Clément Pit--Claudel [this message]
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=ff4653ad-03aa-f973-e7bc-c2dd7cf2298b@gmail.com \
    --to=clement.pit@gmail.com \
    --cc=24762@debbugs.gnu.org \
    /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).