From e5acacdcc1a5469256da6985353b35e0bab99693 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 20 Sep 2009 00:02:05 +0200 Subject: [PATCH] Define with-new-thread macro. --- lisp/subr.el | 4 ++++ 1 file changed, 4 insertions(+) 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. -- 2.39.2