From: yamaoka Date: Thu, 12 Oct 2000 13:08:46 +0000 (+0000) Subject: Synch with Gnus. X-Git-Tag: t-gnus-6_14-quimby-before-installer-changed-~55 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0bab8ef32e7b3ff873710ab834fc5647c6037fab;p=elisp%2Fgnus.git- Synch with Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f25443..417f5ff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2000-10-12 08:26:30 ShengHuo ZHU + + * mm-util.el (mm-with-unibyte-current-buffer): Revert to old. + (mm-with-unibyte-current-buffer-mule4): New function. + * qp.el (quoted-printable-encode-region): Use it. + * rfc2047.el (rfc2047-decode): Ditto. + * webmail.el (webmail-init): Revert to use mm-disable-multibyte. + 2000-10-10 08:44:13 ShengHuo ZHU * rfc2047.el (rfc2047-fold-region): "=?=" is not a break point. diff --git a/lisp/mm-util.el b/lisp/mm-util.el index e989047..016d3a1 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -358,8 +358,7 @@ See also `with-temp-file' and `with-output-to-string'." "Evaluate FORMS there like `progn' in current buffer." (let ((multibyte (make-symbol "multibyte"))) `(if (or (featurep 'xemacs) - (not (fboundp 'set-buffer-multibyte)) - (charsetp 'eight-bit-control)) ;; For Emacs Mule 4 only. + (not (fboundp 'set-buffer-multibyte))) (progn ,@forms) (let ((,multibyte (default-value 'enable-multibyte-characters))) @@ -375,6 +374,28 @@ See also `with-temp-file' and `with-output-to-string'." (put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0) (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body)) +(defmacro mm-with-unibyte-current-buffer-mule4 (&rest forms) + "Evaluate FORMS there like `progn' in current buffer. +Mule4 only." + (let ((multibyte (make-symbol "multibyte"))) + `(if (or (featurep 'xemacs) + (not (fboundp 'set-buffer-multibyte)) + (charsetp 'eight-bit-control)) ;; For Emacs Mule 4 only. + (progn + ,@forms) + (let ((,multibyte (default-value 'enable-multibyte-characters))) + (unwind-protect + (let ((buffer-file-coding-system mm-binary-coding-system) + (coding-system-for-read mm-binary-coding-system) + (coding-system-for-write mm-binary-coding-system)) + (set-buffer-multibyte nil) + (setq-default enable-multibyte-characters nil) + ,@forms) + (setq-default enable-multibyte-characters ,multibyte) + (set-buffer-multibyte ,multibyte)))))) +(put 'mm-with-unibyte-current-buffer-mule4 'lisp-indent-function 0) +(put 'mm-with-unibyte-current-buffer-mule4 'edebug-form-spec '(body)) + (defmacro mm-with-unibyte (&rest forms) "Set default `enable-multibyte-characters' to `nil', eval the FORMS." (let ((multibyte (make-symbol "multibyte"))) diff --git a/lisp/qp.el b/lisp/qp.el index 24b0c70..79e4362 100644 --- a/lisp/qp.el +++ b/lisp/qp.el @@ -94,7 +94,7 @@ encode lines starting with \"From\"." (save-excursion (save-restriction (narrow-to-region from to) - (mm-with-unibyte-current-buffer + (mm-with-unibyte-current-buffer-mule4 ;; (mm-encode-body) ;; Encode all the non-ascii and control characters. (goto-char (point-min)) diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 717cf2b..d699a4b 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -477,7 +477,7 @@ If your Emacs implementation can't decode CHARSET, it returns nil." (when (and (eq cs 'ascii) mail-parse-charset) (setq cs mail-parse-charset)) - (mm-with-unibyte-current-buffer + (mm-with-unibyte-current-buffer-mule4 ;; In Emacs Mule 4, decoding UTF-8 should be in unibyte mode. (mm-decode-coding-string (cond diff --git a/lisp/webmail.el b/lisp/webmail.el index cd8d77b..d947ca0 100644 --- a/lisp/webmail.el +++ b/lisp/webmail.el @@ -283,7 +283,7 @@ (set-buffer webmail-buffer) (setq webmail-buffer (nnheader-set-temp-buffer " *webmail*")) - (mm-disable-multibyte-mule4))) + (mm-disable-multibyte))) (defvar url-package-name) (defvar url-package-version)