dana@softg.UUCP (Eric Dana) (01/22/88)
Is there (gulp!) a GO function in EMACS lisp to transfer control to a label (probably specified by a PROG)? I know goto's aren't usually used in LISP, but this just one of those times... Thanks in advance... Eric Dana
markl@PTT.LCS.MIT.EDU (01/26/88)
From: dana@softg.UUCP (Eric Dana) Keywords: GO Date: 22 Jan 88 15:17:57 GMT Organization: Softech Inc., Waltham, Ma. Is there (gulp!) a GO function in EMACS lisp to transfer control to a label (probably specified by a PROG)? I know goto's aren't usually used in LISP, but this just one of those times... Thanks in advance... Eric Dana Not that I know of. Why on earth do you need a goto? Try looking at the documentation for the functions "unwind-protect" and "condition-case". They allow you to transfer control up through several stack frames without having to return from each one. They are typically used for signal handling, but by invention of your own signals you could probably simulate a goto fairly well. markl Internet: markl@ptt.lcs.mit.edu Mark L. Lambert MIT Laboratory for Computer Science Distributed Systems Group ----------
cef@H.GP.CS.CMU.EDU (Charles Fineman) (01/26/88)
Don't forget about throw and catch. This is probably what he really wants (that is, since he can't have the goto). I hope that most folks know that with some sort of an iterative construct, you can get around ANY goto. (For a source on this, look at Fundementals of Programming or something like that by Shaw, Hillfinger, and couple of other folks I never heard of). Charlie Fineman