unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Gregory <czipperz@gmail.com>
Subject: Re: Define progn_ignore to run Fprogn and ignore output
Date: Tue, 27 Dec 2016 19:30:35 -0600	[thread overview]
Message-ID: <87o9zwu9fo.fsf@gmail.com> (raw)

Your implementation is not what I intended.  Please add the following
diff.  I also fixed an additional place that still was declaring
unwind_body.

diff --git a/src/eval.c b/src/eval.c
index e50e26a..abd4028 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -458,7 +458,11 @@ usage: (progn BODY...)  */)
 void
 prog_ignore (Lisp_Object body)
 {
-  Fprogn (body);
+  while (CONSP (body))
+    {
+      eval_sub (XCAR (body));
+      body = XCDR (body);
+    }
 }
 
 DEFUN ("prog1", Fprog1, Sprog1, 1, UNEVALLED, 0,
diff --git a/test/manual/etags/c-src/emacs/src/lisp.h b/test/manual/etags/c-src/emacs/src/lisp.h
index db87229..1b9d82b 100644
--- a/test/manual/etags/c-src/emacs/src/lisp.h
+++ b/test/manual/etags/c-src/emacs/src/lisp.h
@@ -4042,7 +4042,7 @@ extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object);
 extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object);
 extern void init_eval (void);
 extern void syms_of_eval (void);
-extern void unwind_body (Lisp_Object);
+extern void prog_ignore (Lisp_Object);
 extern ptrdiff_t record_in_backtrace (Lisp_Object, Lisp_Object *, ptrdiff_t);
 extern void mark_specpdl (void);
 extern void get_backtrace (Lisp_Object array);



             reply	other threads:[~2016-12-28  1:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28  1:30 Chris Gregory [this message]
2016-12-28  6:26 ` Define progn_ignore to run Fprogn and ignore output Paul Eggert
  -- strict thread matches above, loose matches on Subject: below --
2016-12-27  2:14 Chris Gregory
2016-12-27  6:26 ` Eli Zaretskii
2016-12-27 16:28   ` Chris Gregory
2016-12-27 18:45     ` Paul Eggert
2016-12-27 15:49 ` Alan Mackenzie
2016-12-27 16:28   ` Chris Gregory

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=87o9zwu9fo.fsf@gmail.com \
    --to=czipperz@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).