all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#29039: `iter-do' doesn't instrument its body
@ 2017-10-28 11:07 Paul Pogonyshev
  2017-10-28 11:32 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Pogonyshev @ 2017-10-28 11:07 UTC (permalink / raw)
  To: 29039

[-- 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-03 13:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-28 11:07 bug#29039: `iter-do' doesn't instrument its body Paul Pogonyshev
2017-10-28 11:32 ` Eli Zaretskii
2017-10-28 12:48   ` Paul Pogonyshev
2017-11-03 13:51     ` Eli Zaretskii

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.