Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: PATCH for mm-util.el
Date: 24 Nov 1998 10:59:44 +0900	[thread overview]
Message-ID: <283e79onov.fsf@kchisa.ga.sony.co.jp> (raw)

It seems that coding systems and MIME charsets are confused in
mm-decode-coding-* and mm-encode-coding-*. Please apply the following
patch if it is appropriate.

--- pgnus-0.53/lisp/mm-util.el~	Sat Nov 21 17:51:18 1998
+++ pgnus-0.53/lisp/mm-util.el	Tue Nov 24 10:37:42 1998
@@ -75,11 +75,7 @@
        (if (fboundp (car elem))
 	   (fset nfunc (car elem))
 	 (fset nfunc (cdr elem)))))
-   '((decode-coding-string . (lambda (s a) s))
-     (encode-coding-string . (lambda (s a) s))
-     (encode-coding-region . ignore)
-     (coding-system-list . ignore)
-     (decode-coding-region . ignore)
+   '((coding-system-list . ignore)
      (char-int . identity)
      (device-type . ignore)
      (coding-system-equal . equal)
@@ -94,6 +90,36 @@
 	  (completing-read
 	   prompt (mapcar (lambda (s) (list (symbol-name (car s))))
 			  mm-mime-mule-charset-alist)))))))
+
+(eval-and-compile
+  (mapcar
+   (lambda (elem)
+     (let ((nfunc (intern (format "mm-%s" (car elem)))))
+       (if (fboundp (car elem))
+	   (fset nfunc (cadr elem))
+	 (fset nfunc (caddr elem)))))
+   '((decode-coding-string
+      (lambda (string coding-system-or-mime-charset)
+	(decode-coding-string
+	 string (mm-charset-to-coding-system coding-system-or-mime-charset)))
+      (lambda (s a) s))
+     (encode-coding-string
+      (lambda (string coding-system-or-mime-charset)
+	(encode-coding-string
+	 string (mm-charset-to-coding-system coding-system-or-mime-charset)))
+      (lambda (s a) s))
+     (encode-coding-region
+      (lambda (start end coding-system-or-mime-charset)
+	(encode-coding-region
+	 start end
+	 (mm-charset-to-coding-system coding-system-or-mime-charset)))
+      ignore)
+     (decode-coding-region
+      (lambda (start end coding-system-or-mime-charset)
+	(decode-coding-region
+	 start end
+	 (mm-charset-to-coding-system coding-system-or-mime-charset)))
+      ignore))))
 
 (defvar mm-coding-system-list nil)
 (defun mm-get-coding-system-list ()
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



             reply	other threads:[~1998-11-24  1:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-24  1:59 Katsumi Yamaoka [this message]
1998-11-24  6:30 ` Shenghuo ZHU
1998-11-24  6:51   ` Katsumi Yamaoka
1998-11-24 10:21 ` Lars Magne Ingebrigtsen
1998-11-24 10:53   ` Katsumi Yamaoka
1998-11-24 11:24     ` Lars Magne Ingebrigtsen
1998-11-24 11:36       ` Katsumi Yamaoka
1998-11-24 16:14         ` Shenghuo ZHU
1998-11-24 19:55           ` Lars Magne Ingebrigtsen
1998-11-24 20:36             ` Shenghuo ZHU
1998-11-25  9:08               ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=283e79onov.fsf@kchisa.ga.sony.co.jp \
    --to=yamaoka@jpl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).