<div>I thought this was working at some point, but it doesn't seem to now. FOO() returns undefined in JS, when it should return 123:</div><div><br></div><div><div>(defun bar (fn)</div><div> (funcall fn))</div><div><br>
</div><div>(defun foo ()</div><div> (bar (lambda () (return-from foo 123))))</div></div><div><br></div><div>It seems the value stored under the name "ps-return-value" isn't actually returned:</div><div><br>
</div><div><div>function foo() {</div><div> try {</div><div> return bar(function () {</div><div> throw { 'ps-block-tag' : 'foo', 'ps-return-value' : 123 };</div><div> });</div>
<div> } catch (err) {</div><div> if (err && 'foo' === err['ps-block-tag']) {</div><div> err['ps-return-value'];</div><div> } else {</div><div> throw err;</div>
<div> };</div><div> };</div><div>};</div></div>