summaryrefslogtreecommitdiff
path: root/lisp/gnus/gmm-utils.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-12-03 12:15:03 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-12-03 12:15:03 +0000
commit14bcc1e098410087a837313e2fc822319ff2e8ca (patch)
treee468aebbb8d84438d81eb08bf6b77bfeaf664ea7 /lisp/gnus/gmm-utils.el
parent5665a02fd1d009506f246d5f77896e3995127954 (diff)
parent704ec54b3f2a40026ea7835b76e040c7335a56c1 (diff)
downloademacs-14bcc1e098410087a837313e2fc822319ff2e8ca.tar.gz
Merged from emacs@sv.gnu.org.
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-474 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-475 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-476 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-477 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-478 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-150 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-151 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-152 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-584
Diffstat (limited to 'lisp/gnus/gmm-utils.el')
-rw-r--r--lisp/gnus/gmm-utils.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
index e773aa3bfac..59d02927008 100644
--- a/lisp/gnus/gmm-utils.el
+++ b/lisp/gnus/gmm-utils.el
@@ -401,6 +401,21 @@ If mode is nil, use `major-mode' of the curent buffer."
(string-match "^\\(.+\\)-mode$" mode)
(match-string 1 mode))))))
+(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
+ (or (featurep 'xemacs)
+ (= emacs-major-version 20)))
+ (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)))
+
(provide 'gmm-utils)
;; arch-tag: e0b60920-2ce6-40c1-bfc0-cadbbe26b602