When using XEmacs/MULE, the seventh argument to write-region is a coding
system to use when writing, not the test `confim-p'.

This would cause XEmacs/MULE to prompt every time you wrote a file for
confirmation. The attached patch makes this work by ignoring the final
argument.

Soon I will have a think about how this coding system interacts with the
writing of regions; until then I suspect that rcp will break files in
any sort of complex encoding.

        Daniel

--- rcp.el~	Mon Jan 10 20:46:20 2000
+++ rcp.el	Fri Jan 21 12:43:54 2000
@@ -1518,7 +1518,9 @@
   (unless (or (eq lockname nil)
               (string= lockname filename))
     (error "rcp-handle-write-region: LOCKNAME must be nil or equal FILENAME"))
-  (when (and confirm (file-exists-p filename))
+  ;; XEmacs takes a coding system as the sevent argument, not `confirm'
+  (when (and (not (featurep 'xemacs))
+		  confirm (file-exists-p filename))
     (unless (y-or-n-p (format "File %s exists; overwrite anyway? "
                               filename))
       (error "File not overwritten")))

-- 
The average man doesn't want to be free. He wants to be safe.
        -- H.L. Mencken

Reply via email to