+2000-10-12 08:26:30 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * 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 <zsh@cs.rochester.edu>
* rfc2047.el (rfc2047-fold-region): "=?=" is not a break point.
"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)))
(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")))
(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
(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)