Gnus development mailing list
 help / color / mirror / Atom feed
* PATCH for mm-util.el
@ 1998-11-24  1:59 Katsumi Yamaoka
  1998-11-24  6:30 ` Shenghuo ZHU
  1998-11-24 10:21 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 11+ messages in thread
From: Katsumi Yamaoka @ 1998-11-24  1:59 UTC (permalink / 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>



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1998-11-25  9:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-24  1:59 PATCH for mm-util.el Katsumi Yamaoka
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

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).