diff scripts/plot/drawnow.m @ 6418:2efe282221ed

[project @ 2007-03-20 16:46:47 by jwe]
author jwe
date Tue, 20 Mar 2007 16:46:47 +0000
parents b298a4c12fc3
children 73fcbac81f33
line wrap: on
line diff
--- a/scripts/plot/drawnow.m
+++ b/scripts/plot/drawnow.m
@@ -26,12 +26,9 @@
 
 function drawnow (term, file)
 
-  ## Use this instead of persistent and mlock so that drawnow can be
-  ## replaced.
-  global __go_close_all_registered__;
-  if (isempty (__go_close_all_registered__))
-    __lock_global__ ("__go_close_all_registered__");
-  endif
+  ## If drawnow is cleared, it is possible to register __go_close_all__
+  ## more than once, but that is not fatal.
+  persistent __go_close_all_registered__;
 
   ## Use this instead of calling gcf to avoid creating a figure.