summaryrefslogtreecommitdiff
path: root/lisp/gnus/gmm-utils.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-10-15 02:49:46 +0000
committerMiles Bader <miles@gnu.org>2006-10-15 02:49:46 +0000
commit92edaeeda5c362acf2c7e7f72b3666ab7673699a (patch)
treed4338a2612cd6f4c7018512c001cd3d6b467e466 /lisp/gnus/gmm-utils.el
parent646ff7942c3df41d0e548d848af9240c542a4c69 (diff)
downloademacs-92edaeeda5c362acf2c7e7f72b3666ab7673699a.tar.gz
Merge from gnus--rel--5.10
Patches applied: * gnus--rel--5.10 (patch 150-152) - Update from CVS 2006-10-13 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> * lisp/gnus/mm-uu.el (mm-uu-pgp-signed-extract-1): Use RFC 2440 definition of "blank line" when searching for end of armor headers. 2006-10-11 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gmm-utils.el (gmm-write-region): Fix variable name. 2006-10-10 Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/gmm-utils.el (gmm-write-region): New function based on compatibility code from `mm-make-temp-file'. * lisp/gnus/mm-util.el (mm-make-temp-file): Use `gmm-write-region'. * lisp/gnus/nnmaildir.el (nnmaildir--update-nov) (nnmaildir-request-replace-article, nnmaildir-request-accept-article): Use `gmm-write-region'. 2006-10-13 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> * man/gnus.texi (Other modes): Fix typo. Add alternative index entry for gnus-dired-attach. (Selecting a Group): Fix typo. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-475
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