From 75fedbf345d4f1e5ff1577f994f68f8eb4de0a27 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 29 Oct 2002 11:40:39 +0000 Subject: [PATCH] * gnus-vers.el (gnus-revision-number): Increment to 05. * nnheader.el (nnheader-auto-save-coding-system): Default to `iso-2022-7bit'. * Synch with Oort Gnus. --- ChangeLog | 11 +++++++++-- lisp/ChangeLog | 14 +++++++++++++- lisp/gnus-vers.el | 2 +- lisp/mm-util.el | 15 ++++++--------- lisp/nndraft.el | 33 ++++++++++++++++++++++++++++++--- lisp/nnheader.el | 17 ++++++----------- 6 files changed, 65 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index c38af2d..99ae493 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-10-29 Katsumi Yamaoka + + * lisp/gnus-vers.el (gnus-revision-number): Increment to 05. + + * lisp/nnheader.el (nnheader-auto-save-coding-system): Default to + `iso-2022-7bit'. + 2002-10-29 TSUCHIYA Masatoshi * lisp/nnshimbun.el (nnshimbun-request-article-1): Install trick @@ -89,7 +96,7 @@ gnus-configure-posting-styles. (gnus-summary-execute-command-with-posting-style): Fix prompt string. - * lisp/gnus-cus.el (gnus-group-parameters): Allow (import "...") + * lisp/gnus-cus.el (gnus-group-parameters): Allow (import "...") in posting-styles. 2002-09-08 Daiki Ueno @@ -429,7 +436,7 @@ (gnus-summary-inherit-default-charset): New function. (gnus-parse-headers-hook): Use it. (gnus-summary-setup-default-charset): Set default-mime-charset here. - + * lisp/gnus-delay.el (gnus-delay-article): Undo the last change. * lisp/gnus-draft.el: Revert to the original implementation. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 635703e..cfe7e1c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,8 +1,20 @@ +2002-10-29 Katsumi Yamaoka + + * mm-util.el (mm-auto-save-coding-system): Default to + iso-2022-7bit. + + * nndraft.el (nndraft-request-article): Decode an article using + the coding-system emacs-mule if it seems to have been saved using + emacs-mule. + (nndraft-request-replace-article): Use message-draft-coding-system + instead of mm-auto-save-coding-system for the draft or delayed + group. + 2002-10-28 Josh * mml.el (mml-mode-map): Fixed keybindings for mml-secure-* functions. - + 2002-10-28 Katsumi Yamaoka From mah@everybody.org (Mark A. Hershberger). diff --git a/lisp/gnus-vers.el b/lisp/gnus-vers.el index e795c3b..21d62c8 100644 --- a/lisp/gnus-vers.el +++ b/lisp/gnus-vers.el @@ -34,7 +34,7 @@ (require 'product) (provide 'gnus-vers) -(defconst gnus-revision-number "04" +(defconst gnus-revision-number "05" "Revision number for this version of gnus.") ;; Product information of this gnus. diff --git a/lisp/mm-util.el b/lisp/mm-util.el index adf14b5..296da39 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -154,15 +154,12 @@ "Text coding system for write.") (defvar mm-auto-save-coding-system - (cond - ((mm-coding-system-p 'emacs-mule) - (if (memq system-type '(windows-nt ms-dos ms-windows)) - (if (mm-coding-system-p 'emacs-mule-dos) - 'emacs-mule-dos mm-binary-coding-system) - 'emacs-mule)) - ((mm-coding-system-p 'escape-quoted) 'escape-quoted) - (t mm-binary-coding-system)) - "Coding system of auto save file.") + (if (mm-coding-system-p 'iso-2022-7bit) + 'iso-2022-7bit + mm-binary-coding-system) + "Coding system of auto save file. +Note that the default value for this variable was emacs-mule for Emacs +or escape-quoted for XEmacs-MULE in the past.") (defvar mm-universal-coding-system mm-auto-save-coding-system "The universal coding system.") diff --git a/lisp/nndraft.el b/lisp/nndraft.el index 28c7112..1ce7cac 100644 --- a/lisp/nndraft.el +++ b/lisp/nndraft.el @@ -28,6 +28,7 @@ ;;; Code: (eval-when-compile (require 'cl)) +(eval-when-compile (require 'static)) (require 'nnheader) (require 'nnmail) @@ -107,17 +108,40 @@ (let* ((file (nndraft-article-filename id)) (auto (nndraft-auto-save-file-name file)) (newest (if (file-newer-than-file-p file auto) file auto)) - (nntp-server-buffer (or buffer nntp-server-buffer))) + (nntp-server-buffer (or buffer nntp-server-buffer)) + ;; The default value for `message-draft-coding-system' was + ;; `emacs-mule' for Emacs in the past, and the existing draft + ;; files may have been saved using that coding-system. + (maybe-emacs-mule-p (and (not (featurep 'xemacs)) + (static-if (boundp 'MULE) + (eq message-draft-coding-system + ;; The present default value. + '*iso-2022-jp*) + (eq message-draft-coding-system + ;; The present default value. + 'iso-2022-7bit))))) (when (and (file-exists-p newest) (let ((nnmail-file-coding-system (if (file-newer-than-file-p file auto) (if (member group '("drafts" "delayed")) - message-draft-coding-system + (if maybe-emacs-mule-p + nnheader-text-coding-system + message-draft-coding-system) nnheader-text-coding-system) nnheader-auto-save-coding-system))) (nnmail-find-file newest))) (save-excursion (set-buffer nntp-server-buffer) + (when maybe-emacs-mule-p + (goto-char (point-min)) + (if (re-search-forward "[^\000-\177]" nil t) + ;; Consider the file has been saved using `emacs-mule'. + (decode-coding-region (point-min) (point-max) + (static-if (boundp 'MULE) + '*internal* + 'emacs-mule)) + (decode-coding-region (point-min) (point-max) + message-draft-coding-system))) (goto-char (point-min)) ;; If there's a mail header separator in this file, ;; we remove it. @@ -218,7 +242,10 @@ (deffoo nndraft-request-replace-article (article group buffer) (nndraft-possibly-change-group group) - (let ((nnmail-file-coding-system nnheader-text-coding-system)) + (let ((nnmail-file-coding-system + (if (member group '("drafts" "delayed")) + message-draft-coding-system + nnheader-text-coding-system))) (nnoo-parent-function 'nndraft 'nnmh-request-replace-article (list article group buffer)))) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 2cc8757..f9c452b 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -108,17 +108,12 @@ This variable is a substitute for `mm-text-coding-system'.") "Text coding system for write. This variable is a substitute for `mm-text-coding-system-for-write'.") -(defvar nnheader-auto-save-coding-system - (cond - ((boundp 'MULE) '*internal*) - ((not (fboundp 'find-coding-system)) nil) - ((find-coding-system 'emacs-mule) - (if (memq system-type '(windows-nt ms-dos ms-windows)) - 'emacs-mule-dos 'emacs-mule)) - ((find-coding-system 'escape-quoted) 'escape-quoted) - ((find-coding-system 'no-conversion) 'no-conversion) - (t nil)) - "Coding system of auto save file.") +(defvar nnheader-auto-save-coding-system (static-if (boundp 'MULE) + '*iso-2022-jp* + 'iso-2022-7bit) + "Coding system of auto save file. +Note that the default value for this variable was emacs-mule for Emacs +or escape-quoted for XEmacs-MULE in the past.") (eval-and-compile (autoload 'nnmail-message-id "nnmail") -- 1.7.10.4