all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmail.com>
To: 29039@debbugs.gnu.org
Subject: bug#29039: `iter-do' doesn't instrument its body
Date: Sat, 28 Oct 2017 13:07:00 +0200	[thread overview]
Message-ID: <CAG7Bpap7-ezW_hW18qyokpYtwxQ_Q363_zePWPbcJ2Mz9ukmSQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 437 bytes --]

Attached trivial patch simply adds `(declare (debug ...))' to the
macro. I believe it is perfectly safe and trivial, no mention in NEWS
etc. is needed. I would ask to merge it to branch 26 if possible.

Note that it doesn't quite let you debug generators anyway because of
bug #28725, but the change makes sense regardless. In particular, with
`iter2' package you should be able to debug generator functions called
from `iter-do'.

Paul

[-- Attachment #2: 0001-Add-missing-debug-declaration-to-iter-do.patch --]
[-- Type: text/x-patch, Size: 952 bytes --]

From 40c6256eb7b74cadefe65f23cb6b79336e5b06c1 Mon Sep 17 00:00:00 2001
From: Paul Pogonyshev <pogonyshev@gmail.com>
Date: Sat, 28 Oct 2017 13:01:51 +0200
Subject: [PATCH] Add missing debug declaration to `iter-do'

---
 lisp/emacs-lisp/generator.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index 410e4edcc9..ef6cfba420 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -718,7 +718,8 @@ iter-close
   "Loop over values from an iterator.
 Evaluate BODY with VAR bound to each value from ITERATOR.
 Return the value with which ITERATOR finished iteration."
-  (declare (indent 1))
+  (declare (indent 1)
+           (debug ((symbolp form) body)))
   (let ((done-symbol (cps--gensym "iter-do-iterator-done"))
         (condition-symbol (cps--gensym "iter-do-condition"))
         (it-symbol (cps--gensym "iter-do-iterator"))
-- 
2.14.2


             reply	other threads:[~2017-10-28 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28 11:07 Paul Pogonyshev [this message]
2017-10-28 11:32 ` bug#29039: `iter-do' doesn't instrument its body Eli Zaretskii
2017-10-28 12:48   ` Paul Pogonyshev
2017-11-03 13:51     ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=CAG7Bpap7-ezW_hW18qyokpYtwxQ_Q363_zePWPbcJ2Mz9ukmSQ@mail.gmail.com \
    --to=pogonyshev@gmail.com \
    --cc=29039@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.