summaryrefslogtreecommitdiff
path: root/lisp/gnus/mm-util.el
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2010-05-07 06:58:17 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-05-07 06:58:17 +0000
commit765d43190e16d6093aa794743b9f92f40566bb15 (patch)
treeadeb28652d9a53b3c78de981da0e3aac91106920 /lisp/gnus/mm-util.el
parent40ab7974b58fe90e6aa1087453b213e28a89a51d (diff)
downloademacs-765d43190e16d6093aa794743b9f92f40566bb15.tar.gz
Synch with Gnus trunk.
* mail/binhex.el (binhex-decode-region-internal) * mail/uudecode.el (uudecode-decode-region-internal) * net/dns.el (dns-read-string-name, dns-write, dns-read) (dns-read-type, dns-query) * pgg-parse.el (pgg-parse-armor) * pgg.el (pgg-verify-region) * sha1.el (sha1-string-external): Don't run set-buffer-multibyte for XEmacs. * net/imap.el (imap-disable-multibyte): Redefine them as a macro. * nnweb.el (nnweb-gmane-search) * yenc.el (yenc-decode-region): Don't run set-buffer-multibyte for XEmacs. * gnus-art.el (gnus-article-browse-html-parts) * gnus-group.el (gnus-read-ephemeral-gmane-group) (gnus-read-ephemeral-bug-grou): Use mm-make-temp-file instead of make-temp-file. * gnus-dired.el (gnus-dired-mode): Bind gnus-dired-mode-hook, gnus-dired-mode-on-hook and gnus-dired-mode-off-hook for XEmacs when compiling. * gnus-ml.el (gnus-mailing-list-mode): Bind gnus-mailing-list-mode-hook, gnus-mailing-list-mode-on-hook and gnus-mailing-list-mode-off-hook for XEmacs when compiling. * gnus-salt.el (gnus-pick-mode): Bind gnus-pick-mode-on-hook and gnus-pick-mode-off-hook for XEmacs when compiling. (gnus-binary-mode): Bind gnus-binary-mode-on-hook and gnus-binary-mode-off-hook for XEmacs when compiling. * gnus-sum.el (gnus-summary-limit-strange-charsets-predicate): Return nil if char-charset is not available. * sieve-manage.el (sieve-manage-disable-multibyte): Redefine them as a macro. * mm-url.el (mm-url-form-encode-xwfu): Use mm-encode-coding-string instead of encode-coding-string. * mm-util.el (mm-enable-multibyte, mm-disable-multibyte): Use (featurep 'xemacs) instead of mm-emacs-mule to switch function definitions. (mm-with-unibyte-current-buffer): Make it a progn macro for XEmacs.
Diffstat (limited to 'lisp/gnus/mm-util.el')
-rw-r--r--lisp/gnus/mm-util.el54
1 files changed, 28 insertions, 26 deletions
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index c1dc4f5b754..a288b8b1b6d 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -908,20 +908,20 @@ mail with multiple parts is preferred to sending a Unicode one.")
(fboundp 'set-buffer-multibyte))
"True in Emacs with Mule.")
- (if mm-emacs-mule
- (defun mm-enable-multibyte ()
- "Set the multibyte flag of the current buffer.
+ (if (featurep 'xemacs)
+ (defalias 'mm-enable-multibyte 'ignore)
+ (defun mm-enable-multibyte ()
+ "Set the multibyte flag of the current buffer.
Only do this if the default value of `enable-multibyte-characters' is
non-nil. This is a no-op in XEmacs."
- (set-buffer-multibyte 'to))
- (defalias 'mm-enable-multibyte 'ignore))
+ (set-buffer-multibyte t)))
- (if mm-emacs-mule
- (defun mm-disable-multibyte ()
- "Unset the multibyte flag of in the current buffer.
+ (if (featurep 'xemacs)
+ (defalias 'mm-disable-multibyte 'ignore)
+ (defun mm-disable-multibyte ()
+ "Unset the multibyte flag of in the current buffer.
This is a no-op in XEmacs."
- (set-buffer-multibyte nil))
- (defalias 'mm-disable-multibyte 'ignore)))
+ (set-buffer-multibyte nil))))
(defun mm-preferred-coding-system (charset)
;; A typo in some Emacs versions.
@@ -1239,22 +1239,24 @@ worth using this macro in unibyte buffers of course). Use of
harmful since it is likely to modify existing data in the buffer.
For instance, it converts \"\\300\\255\" into \"\\255\" in
Emacs 23 (unicode)."
- ;; FIXME: (default-value 'enable-multibyte-characters) is read-only
- ;; so let-binding it is wrong. The right fix is to not use this
- ;; macro at all any more, since it's been ill-defined from the start.
- (let ((multibyte (make-symbol "multibyte"))
- (buffer (make-symbol "buffer")))
- `(if mm-emacs-mule
- (let ((,multibyte enable-multibyte-characters)
- (,buffer (current-buffer)))
- (unwind-protect
- (letf (((default-value 'enable-multibyte-characters) nil))
- (set-buffer-multibyte nil)
- ,@forms)
- (set-buffer ,buffer)
- (set-buffer-multibyte ,multibyte)))
- (letf (((default-value 'enable-multibyte-characters) nil))
- ,@forms))))
+ (if (featurep 'xemacs)
+ `(progn ,@forms)
+ ;; FIXME: (default-value 'enable-multibyte-characters) is read-only
+ ;; so let-binding it is wrong. The right fix is to not use this
+ ;; macro at all any more, since it's been ill-defined from the start.
+ (let ((multibyte (make-symbol "multibyte"))
+ (buffer (make-symbol "buffer")))
+ `(if mm-emacs-mule
+ (let ((,multibyte enable-multibyte-characters)
+ (,buffer (current-buffer)))
+ (unwind-protect
+ (letf (((default-value 'enable-multibyte-characters) nil))
+ (set-buffer-multibyte nil)
+ ,@forms)
+ (set-buffer ,buffer)
+ (set-buffer-multibyte ,multibyte)))
+ (letf (((default-value 'enable-multibyte-characters) nil))
+ ,@forms)))))
(put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0)
(put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body))