2003-04-08 Jesper Harder <harder@ifa.au.dk>
+ * mm-uu.el (mm-uu-diff-groups-regexp, mm-uu-type-alist)
+ (mm-uu-diff-extract, mm-uu-diff-test): New functionality:
+ recognize diffs.
+
* mm-bodies.el (mm-decode-body): Use the supplied charset
unconditionally if `code-pages' hasn't been loaded.
(defvar mm-uu-emacs-sources-regexp "gnu\\.emacs\\.sources"
"The regexp of emacs sources groups.")
+(defcustom mm-uu-diff-groups-regexp "gnus\\.commits"
+ "*Regexp matching diff groups."
+ :type 'regexp
+ :group 'gnus-article-mime)
+
(defvar mm-uu-type-alist
'((postscript
"^%!PS-"
"^;;;?[ \t]*\\([^ \t]+\\.el\\)[ \t]+ends here"
mm-uu-emacs-sources-extract
nil
- mm-uu-emacs-sources-test)))
+ mm-uu-emacs-sources-test)
+ (diff
+ "^Index: "
+ nil
+ mm-uu-diff-extract
+ nil
+ mm-uu-diff-test)))
(defcustom mm-uu-configure-list '((shar . disabled))
"A list of mm-uu configuration.
mm-uu-emacs-sources-regexp
(string-match mm-uu-emacs-sources-regexp gnus-newsgroup-name)))
+(defun mm-uu-diff-extract ()
+ (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
+ '("text/x-patch")))
+
+(defun mm-uu-diff-test ()
+ (and gnus-newsgroup-name
+ mm-uu-diff-groups-regexp
+ (string-match mm-uu-diff-groups-regexp gnus-newsgroup-name)))
+
(defun mm-uu-forward-extract ()
(mm-make-handle (mm-uu-copy-to-buffer
(progn (goto-char start-point) (forward-line) (point))
+2003-04-08 Jesper Harder <harder@ifa.au.dk>
+
+ * emacs-mime.texi (Non-MIME): Add diff.
+
2003-04-07 Jesper Harder <harder@ifa.au.dk>
* message.texi (Security): Fix typo.
@vindex mm-uu-configure-list
Gnus also understands some non-@sc{mime} attachments, such as
-postscript, uuencode, binhex, yenc, shar, forward, gnatsweb, pgp.
-Each of these features can be disabled by add an item into
+postscript, uuencode, binhex, yenc, shar, forward, gnatsweb, pgp,
+diff. Each of these features can be disabled by add an item into
@code{mm-uu-configure-list}. For example,
@lisp
@item emacs-sources
@findex emacs-sources
+@vindex mm-uu-emacs-sources-regexp
Emacs source code. This item works only in the groups matching
@code{mm-uu-emacs-sources-regexp}.
+@item diff
+@vindex diff
+@vindex mm-uu-diff-groups-regexp
+Patches. This is intended for groups where diffs of committed files
+are automatically sent to. It only works in groups matching
+@code{mm-uu-diff-groups-regexp}.
+
@end table
@node Handles