X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmm-uu.el;h=0cf3730d0955ba70fe6b016669f5996da69b0640;hb=2df323a009ddd334ef992f32b7a8441daa6b6256;hp=a10700ee3d9d9d3e367ad63c695ab1998c0380b8;hpb=573bf0341671133b97e984bae1233fb4c5eef426;p=gnus diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index a10700ee3..0cf3730d0 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -1,7 +1,6 @@ ;;; mm-uu.el --- Return uu stuff as mm handles -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998-2012 Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp @@ -159,6 +158,18 @@ This can be either \"inline\" or \"attachment\".") mm-uu-diff-extract nil mm-uu-diff-test) + (diff + "^=== modified file " + nil + mm-uu-diff-extract + nil + mm-uu-diff-test) + (git-format-patch + "^diff --git " + "^-- " + mm-uu-diff-extract + nil + mm-uu-diff-test) (message-marks ;; Text enclosed with tags similar to `message-mark-insert-begin' and ;; `message-mark-insert-end'. Don't use those variables to avoid @@ -176,7 +187,7 @@ This can be either \"inline\" or \"attachment\".") nil) (verbatim-marks ;; slrn-style verbatim marks, see - ;; http://www.slrn.org/manual/slrn-manual-6.html#ss6.81 + ;; http://slrn.sourceforge.net/docs/slrn-manual-6.html#process_verbatim_marks "^#v\\+" "^#v\\-$" (lambda () (mm-uu-verbatim-marks-extract 0 0)) @@ -186,7 +197,15 @@ This can be either \"inline\" or \"attachment\".") "^\\\\end{document}" mm-uu-latex-extract nil - mm-uu-latex-test)) + mm-uu-latex-test) + (org-src-code-block + "^[ \t]*#\\+begin_" + "^[ \t]*#\\+end_" + mm-uu-org-src-code-block-extract) + (org-meta-line + "^[ \t]*#\\+[[:alpha:]]+: " + "$" + mm-uu-org-src-code-block-extract)) "A list of specifications for non-MIME attachments. Each element consist of the following entries: label, start-regexp, end-regexp, extract-function, test-function. @@ -383,6 +402,10 @@ apply the face `mm-uu-extract'." (list mm-dissect-disposition (cons 'filename file-name)))) +(defun mm-uu-org-src-code-block-extract () + (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) + '("text/x-org"))) + (defvar gnus-newsgroup-name) (defun mm-uu-emacs-sources-test () @@ -407,7 +430,11 @@ apply the face `mm-uu-extract'." (defun mm-uu-forward-extract () (mm-make-handle (mm-uu-copy-to-buffer - (progn (goto-char start-point) (forward-line) (point)) + (progn + (goto-char start-point) + (forward-line) + (skip-chars-forward "\n") + (point)) (progn (goto-char end-point) (forward-line -1) (point))) '("message/rfc822" (charset . gnus-decoded)))) @@ -682,6 +709,8 @@ Assume text has been decoded if DECODED is non-nil." ;; Mutt still uses application/pgp even though ;; it has already been withdrawn. (string-match "\\`text/\\|\\`application/pgp\\'" type) + (equal (car (mm-handle-disposition handle)) + "inline") (setq children (with-current-buffer buffer