unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Re: (progn (top-level) A B C)
@ 2007-02-14 17:37 A Soare
  2007-02-14 17:48 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: A Soare @ 2007-02-14 17:37 UTC (permalink / raw)
  To: Lennart Borgman (gmail)
  Cc: Emacs   Help  [help-gnu-emacs], Emacs   Bug  [bug-gnu-emacs]


> I do not think you can do it directly, but maybe you can use a timer?
> 
> (run-with-idle-timer 0 nil (lambda()

Thanks, I will check. Another method that I found is

(unwind-protect
    (prog1
        (message "x")
      (top-level))
  (message "a")
  (message "b"))


By the way, this code returns "Back to top level." . BAD.

x
a
b
Back to top level.

What is the definition of prog1? It should return the first argument. It seems that in this case the 1st argument is lost.

This is a BUG in prog1... I think that prog2, progn give the same bug... That is?


Does somebody else knows another methods? Let us make all of you that know a list of methods here for this problem, please...


Trying to solve a bug in the E debugger I asked myself this problem...

Alin Soare.



> Message du 14/02/07 à 17h38
> De : "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> A : alinsoar@voila.fr
> Copie à : "Emacs Help [help-gnu-emacs]" <help-gnu-emacs@gnu.org>
> Objet : Re: (progn (top-level) A B C)
> 
> A Soare wrote:
> > Hello,
> > 
> > Can somebody tell me how you write a code to execute the followiung commands in the order t-l A B C:
> > 
> > (top-level)
> > (A ...)
> > (B ...)
> > (C ...) ?
> 
> 
> I do not think you can do it directly, but maybe you can use a timer?
> 
> (run-with-idle-timer 0 nil (lambda()
>                               (message "a")(sit-for 1)
>                               (message "b")(sit-for 1)
>                               (message "c")(sit-for 1)
>                               ))
> (top-level)
> 
>

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

end of thread, other threads:[~2007-02-14 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-14 17:37 (progn (top-level) A B C) A Soare
2007-02-14 17:48 ` Andreas Schwab

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).