From: Tom Tromey Date: Sat, 19 Sep 2009 22:02:05 +0000 (+0200) Subject: Define with-new-thread macro. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5acacdcc1a5469256da6985353b35e0bab99693;p=emacs.git Define with-new-thread macro. --- diff --git a/lisp/subr.el b/lisp/subr.el index be06a558e5a..1c24149e7e0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2889,6 +2889,10 @@ The value returned is the value of the last form in BODY." ,@body) (with-current-buffer ,old-buffer (set-case-table ,old-case-table)))))) + +(defmacro with-new-thread (&rest body) + "Execute the forms in BODY in a new thread." + `(run-in-thread (lambda () ,@body))) ;;; Matching and match data.