From: Tom Tromey Date: Tue, 27 Aug 2013 19:06:17 +0000 (-0600) Subject: zap until-condition X-Git-Tag: emacs-26.0.90~1144^2~17^2~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=44586142ad519003abe97e66b3cea0f6bbb020c2;p=emacs.git zap until-condition --- diff --git a/lisp/subr.el b/lisp/subr.el index e8bbbb675fc..17289ef3ce9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4788,20 +4788,6 @@ This is the simplest safe way to acquire and release a mutex." (progn ,@body) (mutex-unlock ,sym))))) -(defmacro until-condition (test condition) - "Wait for the condition variable CONDITION, checking TEST. -Acquire CONDITION's mutex, then check TEST. -If TEST evaluates to nil, repeatedly invoke `condition-wait' on CONDITION. -When CONDITION is signalled, check TEST again. - -This is the simplest safe way to invoke `condition-wait'." - (let ((cond-sym (make-symbol "condition"))) - `(let ((,cond-sym ,condition)) - (with-mutex (condition-mutex ,cond-sym) - (while (not ,test) - (condition-wait ,cond-sym)))))) - - ;;; Misc. (defconst menu-bar-separator '("--")