+2002-08-07  Jesper harder  <harder@ifa.au.dk>
+
+       * yenc.el: New file.
+
+       * mm-uu.el (mm-uu-yenc-decode-function): New variable.
+       (mm-uu-type-alist): Add yenc.
+       (mm-uu-yenc-filename): New function.
+       (mm-uu-yenc-extract): New function.
+
+       * mm-bodies.el (mm-decode-content-transfer-encoding): Add yenc.
+
+2002-08-06  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * dgnushack.el (merge): Don't use coerce.
+
 2002-05-27  Jesper Harder  <harder@ifa.au.dk>
 
        * mailcap.el (mailcap-mime-data): Test window-system rather than
 
            (require 'mm-uu)
            (funcall mm-uu-binhex-decode-function (point-min) (point-max))
            t)
+          ((eq encoding 'x-yenc)
+           (require 'mm-uu)
+           (funcall mm-uu-yenc-decode-function (point-min) (point-max))
+           )
           ((functionp encoding)
            (funcall encoding (point-min) (point-max))
            t)
         (message "Error while decoding: %s" error)
         nil))
     (when (and
-          (memq encoding '(base64 x-uuencode x-uue x-binhex))
+          (memq encoding '(base64 x-uuencode x-uue x-binhex x-yenc))
           (equal type "text/plain"))
       (goto-char (point-min))
       (while (search-forward "\r\n" nil t)
 
 (autoload 'binhex-decode-region-external "binhex")
 (autoload 'binhex-decode-region-internal "binhex")
 
+(autoload 'yenc-decode-region "yenc")
+(autoload 'yenc-extract-filename "yenc")
+
 (defcustom mm-uu-decode-function 'uudecode-decode-region
   "*Function to uudecode.
 Internal function is done in Lisp by default, therefore decoding may
                 (function-item :tag "External" binhex-decode-region-external))
   :group 'gnus-article-mime)
 
+(defvar mm-uu-yenc-decode-function 'yenc-decode-region)
+
 (defvar mm-uu-pgp-beginning-signature
   "^-----BEGIN PGP SIGNATURE-----")
 
      mm-uu-binhex-extract
      nil
      mm-uu-binhex-filename)
+    (yenc
+     "^=ybegin.*size=[0-9]+.*name=.*$"
+     "^=yend.*size=[0-9]+"
+     mm-uu-yenc-extract
+     mm-uu-yenc-filename)
     (shar
      "^#! */bin/sh"
      "^exit 0$"
        (ignore-errors
          (binhex-decode-region start-point end-point t))))
 
+(defun mm-uu-yenc-filename ()
+  (goto-char start-point)
+  (setq file-name
+       (ignore-errors
+         (yenc-extract-filename))))
+
 (defun mm-uu-forward-test ()
   (save-excursion
     (goto-char start-point)
                      (list mm-dissect-disposition
                            (cons 'filename file-name)))))
 
+(defun mm-uu-yenc-extract ()
+  (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
+                 (list (or (and file-name
+                                (string-match "\\.[^\\.]+$" file-name)
+                                (mailcap-extension-to-mime
+                                 (match-string 0 file-name)))
+                           "application/octet-stream"))
+                 'x-yenc nil
+                 (if (and file-name (not (equal file-name "")))
+                     (list mm-dissect-disposition
+                           (cons 'filename file-name)))))
+
+
 (defun mm-uu-shar-extract ()
   (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
                  '("application/x-shar")))
 
+2002-08-07  Jesper harder  <harder@ifa.au.dk>
+
+       * emacs-mime.texi (Non-MIME): Add yenc.
+       (yenc): New node.
+
 2002-08-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus.texi (Summary Sorting): Document randomization.
 
 @section Non-MIME
 
 Gnus also understands some non-@sc{mime} attachments, such as
-postscript, uuencode, binhex, shar, forward, gnatsweb, pgp.  Each of
-these features can be disabled by add an item into
+postscript, uuencode, binhex, yenc, shar, forward, gnatsweb, pgp.
+Each of these features can be disabled by add an item into
 @code{mm-uu-configure-list}.  For example,
 
 @lisp
 @findex binhex
 Binhex encoded file.
 
+@item yenc
+@findex yenc
+Yenc encoded file.
+
 @item shar
 @findex shar
 Shar archive file.
 * base64::       Base64 en/decoding.
 * binhex::       Binhex decoding.
 * uudecode::     Uuencode decoding.
+* yenc::         Yenc decoding.
 * rfc1843::      Decoding HZ-encoded text.
 * mailcap::      How parts are displayed is specified by the @file{.mailcap} file
 @end menu
 @end table
 
 
+@node yenc
+@section yenc
+@cindex yenc
+
+@code{yenc} is used for encoding binaries on Usenet.  The following
+function is supplied by this package:
+
+@table @code
+@item yenc-decode-region
+@findex yenc-decode-region
+Decode the encoded text in the region.
+
+@end table
+
+
 @node rfc1843
 @section rfc1843
 @cindex rfc1843