From 126cbb422adc756d37ddf9eeac9df71537c75b39 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Mon, 9 Oct 2000 13:35:39 +0000 Subject: [PATCH] (mail-source-fetch-imap): Bind default-enable-multibyte-characters rather than using mm-disable-multibyte. --- lisp/gnus/ChangeLog | 11 +++++++++++ lisp/gnus/mail-source.el | 21 ++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c03ebda682..79c325d9d4 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,14 @@ +2000-10-09 Dave Love + + * mail-source.el (mail-source-fetch-imap): Bind + default-enable-multibyte-characters rather than using + mm-disable-multibyte. + +2000-10-03 ShengHuo ZHU + + * mail-source.el (mail-source-fetch-maildir): Don't insert + newlines. + 2000-10-06 Stefan Monnier * mm-encode.el: Require CL. At least, for `incf'. diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index 1702ca2b7b..613038aa03 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -688,7 +688,10 @@ If ARGS, PROMPT is used as an argument to `format'." (defvar mail-source-report-new-mail-timer nil) (defvar mail-source-report-new-mail-idle-timer nil) -(eval-when-compile (require 'timer)) +(eval-when-compile + (if (featurep 'xemacs) + (require 'itimer) + (require 'timer))) (defun mail-source-start-idle-timer () ;; Start our idle timer if necessary, so we delay the check until the @@ -769,10 +772,10 @@ This only works when `display-time' is enabled." ;;; (current-time-string) "\n")) ;;; (while (re-search-forward "^From " nil t) ;;; (replace-match ">From ")) +;;; (goto-char (point-max)) +;;; (insert "\n\n") ;; MMDF mail format - (insert "\001\001\001\001\n") - (goto-char (point-max)) - (insert "\n\n")) + (insert "\001\001\001\001\n")) (delete-file file))))) (incf found (mail-source-callback callback file)))))) found))) @@ -808,12 +811,12 @@ This only works when `display-time' is enabled." user (or (cdr (assoc from mail-source-password-cache)) password) buf) (imap-mailbox-select mailbox nil buf)) - (let (str (coding-system-for-write mail-source-imap-file-coding-system)) + (let ((coding-system-for-write mail-source-imap-file-coding-system) + ;; Avoid converting 8-bit chars from inserted strings to + ;; multibyte. + default-enable-multibyte-characters + str) (with-temp-file mail-source-crash-box - ;; In some versions of FSF Emacs, inserting unibyte - ;; string into multibyte buffer may convert 8-bit chars - ;; into latin-iso8859-1 chars, which results \201's. - (mm-disable-multibyte) ;; remember password (with-current-buffer buf (when (or imap-password -- 2.20.1