with `t-gnus-6_14'.
* message.el (message-save-drafts): Rewrite.
Sync with Gnus
200006050242 (quimby's clock may lose a day :-).
* nnheader.el (nnheader-text-coding-system-for-write,
nnheader-text-coding-system): New variables, substitutes for
`mm-text-coding-system-for-write' or `mm-text-coding-system'.
* nnmbox.el (nnmbox-active-file-coding-system, nnmbox-file-coding-system): Use
`nnheader-text-coding-system'.
* nnmail.el (nnmail-incoming-coding-system): Ditto.
* nnfolder.el (nnfolder-file-coding-system): Ditto.
(nnfolder-active-file-coding-system): Ditto.
* mail-source.el (mail-source-text-coding-system): Remove.
(TopLevel): require `nnheader'.
* nndraft.el (nndraft-request-article): Bind coding system to
`nnheader-text-coding-system'.
(nndraft-request-replace-article): Ditto.
* mail-source.el (mail-source-fetch-maildir): Ditto.
* gnus-uu.el (gnus-uu-save-article): Ditto.
* gnus-util.el (gnus-output-to-mail, gnus-output-to-rmail): Ditto.
* gnus-soup.el (gnus-soup-write-prefixes): Ditto.
* gnus-util.el (gnus-write-buffer): Bind `file-name-coding-system' to
`nnmail-pathname-coding-system'.
* gnus-start.el (gnus-slave-save-newsrc): Bind coding system to
`gnus-startup-file-coding-system'.
2000-06-06 Katsumi Yamaoka <yamaoka@jpl.org>
+ * lisp/message.el (message-save-drafts): Rewrite.
+
+ * lisp/nnheader.el (nnheader-text-coding-system-for-write,
+ nnheader-text-coding-system): New variables, substitutes for
+ `mm-text-coding-system-for-write' or `mm-text-coding-system'.
+
+ * lisp/nnmbox.el (nnmbox-active-file-coding-system,
+ nnmbox-file-coding-system): Use `nnheader-text-coding-system'.
+ * lisp/nnmail.el (nnmail-incoming-coding-system): Ditto.
+ * lisp/nnfolder.el (nnfolder-file-coding-system): Ditto.
+ (nnfolder-active-file-coding-system): Ditto.
+
+ * lisp/mail-source.el (mail-source-text-coding-system): Remove.
+ (TopLevel): require `nnheader'.
+
+ * lisp/nndraft.el (nndraft-request-article): Bind coding system to
+ `nnheader-text-coding-system'.
+ (nndraft-request-replace-article): Ditto.
+ * lisp/mail-source.el (mail-source-fetch-maildir): Ditto.
+ * lisp/gnus-uu.el (gnus-uu-save-article): Ditto.
+ * lisp/gnus-util.el (gnus-output-to-mail, gnus-output-to-rmail):
+ Ditto.
+ * lisp/gnus-soup.el (gnus-soup-write-prefixes): Ditto.
+
+ * lisp/gnus-util.el (gnus-write-buffer): Bind
+ `file-name-coding-system' to `nnmail-pathname-coding-system'.
+ * lisp/gnus-start.el (gnus-slave-save-newsrc): Bind coding system
+ to `gnus-startup-file-coding-system'.
+
+2000-06-06 Katsumi Yamaoka <yamaoka@jpl.org>
+
* lisp/gnus-vers.el (gnus-revision-number): Increment to 03.
* lisp/message.el (message-fix-before-sending): Don't check for
+2000-06-05 22:25:12 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-cache.el (gnus-cache-possibly-enter-article): Bind coding
+ system.
+ * gnus-soup.el (gnus-soup-write-prefixes): Ditto.
+ * gnus-start.el (gnus-slave-save-newsrc): Ditto.
+ * gnus-util.el (gnus-output-to-rmail): Ditto.
+ (gnus-output-to-mail): Ditto.
+ (gnus-write-buffer): Ditto.
+ * gnus-uu.el (gnus-uu-save-article): Ditto.
+
2000-06-04 15:05:16 Shenghuo ZHU <zsh@cs.rochester.edu>
* message.el (message-read-from-minibuffer): Typo.
(while (setq prefix (pop prefixes))
(erase-buffer)
(insert (format "(setq gnus-soup-prev-prefix %d)\n" (cdr prefix)))
- (gnus-write-buffer (concat (car prefix) gnus-soup-prefix-file))))))
+ (gnus-write-buffer-as-coding-system
+ nnheader-text-coding-system
+ (concat (car prefix) gnus-soup-prefix-file))))))
(defun gnus-soup-pack (dir packer)
(let* ((files (mapconcat 'identity
(make-temp-name (concat gnus-current-startup-file "-slave-")))
(modes (ignore-errors
(file-modes (concat gnus-current-startup-file ".eld")))))
- (gnus-write-buffer slave-name)
+ (gnus-write-buffer-as-coding-system
+ gnus-startup-file-coding-system slave-name)
(when modes
(set-file-modes slave-name modes)))))
"Write the current buffer's contents to FILE."
;; Make sure the directory exists.
(gnus-make-directory (file-name-directory file))
- ;; Write the buffer.
- (write-region (point-min) (point-max) file nil 'quietly))
+ (let ((file-name-coding-system nnmail-pathname-coding-system)
+ (pathname-coding-system nnmail-pathname-coding-system))
+ ;; Write the buffer.
+ (write-region (point-min) (point-max) file nil 'quietly)))
(defun gnus-write-buffer-as-binary (file)
"Write the current buffer's contents to FILE without code conversion."
(set-buffer file-buffer)
(rmail-insert-rmail-file-header)
(let ((require-final-newline nil))
- (gnus-write-buffer filename)))
+ (gnus-write-buffer-as-coding-system
+ nnheader-text-coding-system filename)))
(kill-buffer file-buffer))
(error "Output file does not exist")))
(set-buffer tmpbuf)
(save-excursion
(set-buffer file-buffer)
(let ((require-final-newline nil))
- (gnus-write-buffer-as-binary filename)))
+ (gnus-write-buffer-as-coding-system
+ nnheader-text-coding-system filename)))
(kill-buffer file-buffer))
(error "Output file does not exist")))
(set-buffer tmpbuf)
(gnus-uu-save-separate-articles
(save-excursion
(set-buffer buffer)
- (gnus-write-buffer
+ (gnus-write-buffer-as-coding-system
+ nnheader-text-coding-system
(concat gnus-uu-saved-article-name gnus-current-article))
(cond ((eq in-state 'first) (list gnus-uu-saved-article-name 'begin))
((eq in-state 'first-and-last) (list gnus-uu-saved-article-name
(with-current-buffer gnus-uu-digest-buffer
(erase-buffer)
(insert-buffer "*gnus-uu-pre*"))
- (gnus-write-buffer gnus-uu-saved-article-name)))
+ (gnus-write-buffer-as-coding-system
+ nnheader-text-coding-system gnus-uu-saved-article-name)))
(save-excursion
(set-buffer "*gnus-uu-body*")
(goto-char (point-max))
(with-current-buffer gnus-uu-digest-buffer
(goto-char (point-max))
(insert-buffer "*gnus-uu-body*"))
- (write-region
- (point-min) (point-max) gnus-uu-saved-article-name t))))
+ (let ((file-name-coding-system nnmail-pathname-coding-system)
+ (pathname-coding-system nnmail-pathname-coding-system))
+ (write-region-as-coding-system
+ nnheader-text-coding-system
+ (point-min) (point-max) gnus-uu-saved-article-name t)))))
(gnus-kill-buffer "*gnus-uu-pre*")
(gnus-kill-buffer "*gnus-uu-body*")
(push 'end state))
;;; Code:
(eval-when-compile (require 'cl))
+(require 'nnheader)
(eval-and-compile
(autoload 'pop3-movemail "pop3")
(autoload 'pop3-get-message-count "pop3"))
:group 'mail-source
:type 'number)
-(defvar mail-source-text-coding-system
- (if (memq system-type '(windows-nt ms-dos ms-windows))
- 'raw-text-dos
- 'raw-text)
- "Text-safe coding system (For removing ^M).")
-
;;; Internal variables.
(defvar mail-source-string ""
(not (if function
(funcall function file mail-source-crash-box)
(let ((coding-system-for-write
- mail-source-text-coding-system)
+ nnheader-text-coding-system)
(coding-system-for-read
- mail-source-text-coding-system)
+ nnheader-text-coding-system)
(output-coding-system
- mail-source-text-coding-system)
+ nnheader-text-coding-system)
(input-coding-system
- mail-source-text-coding-system))
+ nnheader-text-coding-system))
(with-temp-file mail-source-crash-box
(insert-file-contents file)
(goto-char (point-min))
(autoload 'imap-close "imap")
(autoload 'imap-error-text "imap")
(autoload 'imap-message-flags-add "imap")
- (autoload 'imap-list-to-message-set "imap")
- (autoload 'nnheader-ms-strip-cr "nnheader"))
+ (autoload 'imap-list-to-message-set "imap"))
(defun mail-source-fetch-imap (source callback)
"Fetcher for imap sources."
(let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook))
(read-string prompt))))
-(defvar message-save-buffer " *encoding")
(defun message-save-drafts ()
+ "Postponing the message."
(interactive)
- (if (not (get-buffer message-save-buffer))
- (get-buffer-create message-save-buffer))
- (let ((filename buffer-file-name)
- (buffer (current-buffer))
- (reply-headers message-reply-headers))
- (set-buffer message-save-buffer)
- (erase-buffer)
- (insert-buffer buffer)
- (setq message-reply-headers reply-headers)
- (message-generate-headers '((optional . In-Reply-To)))
- (mime-edit-translate-buffer)
- (write-region (point-min) (point-max) filename)
- (set-buffer buffer)
- (set-buffer-modified-p nil)))
+ (message "Saving %s..." buffer-file-name)
+ (let ((reply-headers message-reply-headers)
+ (msg (buffer-substring-no-properties (point-min) (point-max))))
+ (with-temp-file buffer-file-name
+ (insert msg)
+ (setq message-reply-headers reply-headers)
+ (message-generate-headers '((optional . In-Reply-To)))
+ (mime-edit-translate-buffer))
+ (set-buffer-modified-p nil))
+ (message "Saving %s...done" buffer-file-name))
(provide 'message)
(newest (if (file-newer-than-file-p file auto) file auto))
(nntp-server-buffer (or buffer nntp-server-buffer)))
(when (and (file-exists-p newest)
- (nnmail-find-file newest))
+ (let ((nnmail-file-coding-system nnheader-text-coding-system))
+ (nnmail-find-file newest)))
(save-excursion
(set-buffer nntp-server-buffer)
(goto-char (point-min))
(deffoo nndraft-request-replace-article (article group buffer)
(nndraft-possibly-change-group group)
- (let ((nnmail-file-coding-system
- (if (equal group "drafts")
- message-draft-coding-system
- mail-source-text-coding-system)))
+ (let ((nnmail-file-coding-system nnheader-text-coding-system))
(nnoo-parent-function 'nndraft 'nnmh-request-replace-article
(list article group buffer))))
(defvoo nnfolder-buffer-alist nil)
(defvoo nnfolder-scantime-alist nil)
(defvoo nnfolder-active-timestamp nil)
-(defvoo nnfolder-active-file-coding-system
- (if (memq system-type '(windows-nt ms-dos ms-windows))
- 'raw-text-dos 'raw-text))
+(defvoo nnfolder-active-file-coding-system nnheader-text-coding-system)
(defvoo nnfolder-active-file-coding-system-for-write
nnmail-active-file-coding-system)
-(defvoo nnfolder-file-coding-system nnfolder-active-file-coding-system)
+(defvoo nnfolder-file-coding-system nnheader-text-coding-system)
(defvoo nnfolder-file-coding-system-for-write nnheader-file-coding-system
"Coding system for save nnfolder file.
If NIL, NNFOLDER-FILE-CODING-SYSTEM is used.")
\(setq nnheader-file-name-translation-alist '((?: . ?_)))")
+(defvar nnheader-text-coding-system
+ (if (memq system-type '(windows-nt ms-dos ms-windows))
+ 'raw-text-dos
+ 'raw-text)
+ "Text-safe coding system (For removing ^M).
+This variable is a substitute for `mm-text-coding-system'.")
+
+(defvar nnheader-text-coding-system-for-write nil
+ "Text coding system for write.
+This variable is a substitute for `mm-text-coding-system-for-write'.")
+
(eval-and-compile
(autoload 'nnmail-message-id "nnmail")
(autoload 'mail-position-on-field "sendmail")
(defvar nnmail-file-coding-system 'raw-text
"Coding system used in nnmail.")
-(defvar nnmail-incoming-coding-system 'raw-text
+(defvar nnmail-incoming-coding-system
+ nnheader-text-coding-system
"Coding system used in reading inbox")
(defvar nnmail-pathname-coding-system 'binary
(defvoo nnmbox-group-alist nil)
(defvoo nnmbox-active-timestamp nil)
-(defvoo nnmbox-file-coding-system
- (if (memq system-type '(windows-nt ms-dos ms-windows))
- 'raw-text-dos 'raw-text))
+(defvoo nnmbox-file-coding-system nnheader-text-coding-system)
(defvoo nnmbox-file-coding-system-for-write nil)
-(defvoo nnmbox-active-file-coding-system nnmbox-file-coding-system)
+(defvoo nnmbox-active-file-coding-system nnheader-text-coding-system)
(defvoo nnmbox-active-file-coding-system-for-write nil)
\f