unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Juri Linkov <juri@linkov.net>, Alan Mackenzie <acm@muc.de>
Cc: 66979@debbugs.gnu.org
Subject: bug#66979: Wrong number of arguments with completion-at-point
Date: Tue, 07 Nov 2023 13:31:40 -0500	[thread overview]
Message-ID: <jwvzfzp1kzg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86il6dzbz8.fsf@mail.linkov.net> (Juri Linkov's message of "Tue,  07 Nov 2023 19:53:31 +0200")

>> Some recent change broke completion-at-point:
>>
>> 0. emacs -Q
>> 1. (setq debug-on-error t)
>> 2. Type in the *scratch*:
>>
>>   (defun a M-C-i
>>
>> raises the error (wrong-number-of-arguments (2 . 2) 1)
>
> Stefan, this looks like another case for the recently fixed
> bug#58148, bug#58396, bug#58557.

So you're suggesting we should remove the `debug` from the
`condition-case` in `elisp--local-variables`?

This was added by Alan in:

    commit f931cebce76d911dfc61274e0a8c1de3627b9179
    Author: Alan Mackenzie <acm@muc.de>
    Date:   Wed Sep 20 15:51:17 2023 +0000

    Insert symbol `debug' into two condition-case handlers
    
    This fixes bug#65622.  Also correct a mismatch between a
    function to which advice is added, and that from which it is
    removed.
    
    * lisp/emacs-lisp/macroexp.el (internal-macroexpand-for-load):
    Add a `debug' to the condition-case handler for `error', so
    that a useful backtrace will be produced on a macro expansion
    error.
    
    * lisp/progmodes/elisp-mode.el (elisp--local-variables): Add
    `debug' to a condition-case handler, as above.  In the
    advice-remove call, give the same function, macroexpand-1, as
    in the corresponding advice-add call.

Alan do you remember why you also added the `debug` to the
condition-case in `elisp--local-variables`?
The rest of the commit looks right to me.

Macro expansion errors in there are perfectly normal since
`elisp--local-variables` routinely passes incomplete code to
macroexpand.  IOW most errors signal'd in there probably don't need to
be debugged at all.


        Stefan






  reply	other threads:[~2023-11-07 18:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07  7:13 bug#66979: Wrong number of arguments with completion-at-point Juri Linkov
2023-11-07 17:53 ` Juri Linkov
2023-11-07 18:31   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-11-07 19:50     ` Alan Mackenzie
2023-11-07 20:13       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-07 23:07         ` Alan Mackenzie
2023-11-08  0:02           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-09  7:32             ` Juri Linkov
2023-11-12 21:03               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=jwvzfzp1kzg.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=66979@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=juri@linkov.net \
    --cc=monnier@iro.umontreal.ca \
    /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).