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: Philipp Stephani <p.stephani2@gmail.com>
Cc: 64459@debbugs.gnu.org
Subject: bug#64459: 30.0.50; Edebug can't instrument certain syntax-propertize-rules forms
Date: Tue, 04 Jul 2023 16:56:36 -0400	[thread overview]
Message-ID: <jwv35232ycx.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <wvr41qhnol4q.fsf@phst-desktop.muc.corp.google.com> (Philipp Stephani's message of "Tue, 04 Jul 2023 15:35:01 +0200")

> (defun foo () (syntax-propertize-rules ((concat ""))))
>
> Now try to instrument this using C-u C-M-x.  This will lead to an error
> "Eager macro-expansion failure":
>
> Debugger entered--Lisp error: (error "Eager macro-expansion failure: (void-function edeb...")
>   signal(error ("Eager macro-expansion failure: (void-function edeb..."))

I think the patch below should fix this problem.
Can you confirm that it fixes it for you in a more realistic setting?


        Stefan


diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index d610fa005cc..002a24af18b 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -249,11 +249,12 @@ syntax-propertize-rules
 Note: There may be at most nine back-references in the REGEXPs of
 all RULES in total."
   (declare (debug (&rest &or symbolp    ;FIXME: edebug this eval step.
-                         (form &rest
-                               (numberp
-                                [&or stringp ;FIXME: Use &wrap
-                                     ("prog1" [&or stringp def-form] def-body)
-                                     def-form])))))
+                         (def-form
+                          &rest
+                          (numberp
+                           [&or stringp ;FIXME: Use &wrap
+                                ("prog1" [&or stringp form] def-body)
+                                form])))))
   (let ((newrules nil))
     (while rules
       (if (symbolp (car rules))






  parent reply	other threads:[~2023-07-04 20:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 13:35 bug#64459: 30.0.50; Edebug can't instrument certain syntax-propertize-rules forms Philipp Stephani
2023-07-04 13:42 ` Eli Zaretskii
2023-07-04 14:06   ` Philipp Stephani
2023-07-04 16:02     ` Eli Zaretskii
2023-07-04 20:56 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-07-04 23:45   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-05  9:34     ` Philipp Stephani
2023-07-05 11:33       ` Eli Zaretskii
2023-07-05 12:43         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-05 13:35           ` Eli Zaretskii
2023-07-05 15:37             ` 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=jwv35232ycx.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=64459@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=p.stephani2@gmail.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).