+(defun gmm-write-region (start end filename &optional append visit
+ lockname mustbenew)
+ "Compatibility function for `write-region'.
+
+In XEmacs, the seventh argument of `write-region' specifies the
+coding-system."
+ (if (and mustbenew (featurep 'xemacs))
+ (if (file-exists-p filename)
+ (signal 'file-already-exists (list "File exists" filename))
+ (write-region start end filename append visit lockname))
+ (write-region start end filename append visit lockname mustbenew)))
+