doc_exists_p
Returns 1 if there is a document in the global environment.
Source code:
global doc_properties if { [array size doc_properties] > 0 } { return 1 } return 0