aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Danjou2011-01-20 23:43:27 +0000
committerKatsumi Yamaoka2011-01-20 23:43:27 +0000
commit6e3165fb24673920b31d67a61ee8e8a2e0b25eec (patch)
tree12d262cf396635e9f3f75f798a0df124107ad2fd
parent8dabbfd6325ea5b11e67fa8358625669808312dd (diff)
downloademacs-6e3165fb24673920b31d67a61ee8e8a2e0b25eec.tar.gz
emacs-6e3165fb24673920b31d67a61ee8e8a2e0b25eec.zip
mm-decode.el (mm-inline-media-tests): Add text/x-sh.
gnus-art.el (gnus-mime-inline-part): Use mm-display-inline rather than mm-insert-inline to insert inline part: this respect mm-inline-media-tests displayers. mm-view.el (mm-display-shell-script-inline): New function. mm-decode.el (mm-inline-media-tests): Add x-shellscript and x-sh. mm-uu.el (mm-uu-type-alist): Add org block. (mm-uu-org-src-code-block-extract): New function. mm-view.el (mm-display-org-inline): New function. mm-decode.el (mm-automatic-display): Add text/org. mailcap.el (mailcap-mime-extensions): Add .org.
-rw-r--r--lisp/gnus/ChangeLog21
-rw-r--r--lisp/gnus/gnus-art.el10
-rw-r--r--lisp/gnus/mailcap.el3
-rw-r--r--lisp/gnus/mm-decode.el7
-rw-r--r--lisp/gnus/mm-uu.el14
-rw-r--r--lisp/gnus/mm-view.el8
6 files changed, 51 insertions, 12 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index e2306c3ac47..c9feb09680b 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -4,6 +4,27 @@
4 the temp buffer. 4 the temp buffer.
5 * message.el (message-mailer-swallows-blank-line): Use with-temp-buffer. 5 * message.el (message-mailer-swallows-blank-line): Use with-temp-buffer.
6 6
72011-01-20 Julien Danjou <julien@danjou.info>
8
9 * mm-decode.el (mm-inline-media-tests): Add text/x-sh.
10
11 * gnus-art.el (gnus-mime-inline-part): Use mm-display-inline rather
12 than mm-insert-inline to insert inline part: this respect
13 mm-inline-media-tests displayers.
14
15 * mm-view.el (mm-display-shell-script-inline): New function.
16
17 * mm-decode.el (mm-inline-media-tests): Add x-shellscript and x-sh.
18
19 * mm-uu.el (mm-uu-type-alist): Add org block.
20 (mm-uu-org-src-code-block-extract): New function.
21
22 * mm-view.el (mm-display-org-inline): New function.
23
24 * mm-decode.el (mm-automatic-display): Add text/org.
25
26 * mailcap.el (mailcap-mime-extensions): Add .org.
27
72011-01-19 Katsumi Yamaoka <yamaoka@jpl.org> 282011-01-19 Katsumi Yamaoka <yamaoka@jpl.org>
8 29
9 * gnus-art.el (gnus-article-highlight): Remove argument passed to 30 * gnus-art.el (gnus-article-highlight): Remove argument passed to
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 8e8fa9b76f0..280914d0f09 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5249,15 +5249,7 @@ Compressed files like .gz and .bz2 are decompressed."
5249 (if (mm-handle-undisplayer handle) 5249 (if (mm-handle-undisplayer handle)
5250 (mm-remove-part handle)))) 5250 (mm-remove-part handle))))
5251 (forward-line 2) 5251 (forward-line 2)
5252 (mm-insert-inline 5252 (mm-display-inline handle)
5253 handle
5254 (if (or coding-system
5255 (and charset
5256 (setq coding-system
5257 (mm-charset-to-coding-system charset))
5258 (not (eq coding-system 'ascii))))
5259 (mm-decode-coding-string contents coding-system)
5260 (mm-string-to-multibyte contents)))
5261 (goto-char b))))) 5253 (goto-char b)))))
5262 5254
5263(defun gnus-mime-set-charset-parameters (handle charset) 5255(defun gnus-mime-set-charset-parameters (handle charset)
diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el
index b6cef39203c..e50e61bb8fb 100644
--- a/lisp/gnus/mailcap.el
+++ b/lisp/gnus/mailcap.el
@@ -910,7 +910,8 @@ If NO-DECODE is non-nil, don't decode STRING."
910 (".zip" . "application/zip") 910 (".zip" . "application/zip")
911 (".ai" . "application/postscript") 911 (".ai" . "application/postscript")
912 (".jpe" . "image/jpeg") 912 (".jpe" . "image/jpeg")
913 (".jpeg" . "image/jpeg")) 913 (".jpeg" . "image/jpeg")
914 (".org" . "text/org"))
914 "An alist of file extensions and corresponding MIME content-types. 915 "An alist of file extensions and corresponding MIME content-types.
915This exists for you to customize the information in Lisp. It is 916This exists for you to customize the information in Lisp. It is
916merged with values from mailcap files by `mailcap-parse-mimetypes'.") 917merged with values from mailcap files by `mailcap-parse-mimetypes'.")
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 62755347142..40cfa9b2453 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -237,7 +237,11 @@ before the external MIME handler is invoked."
237 (lambda (handle) (fboundp 'diff-mode))) 237 (lambda (handle) (fboundp 'diff-mode)))
238 ("application/emacs-lisp" mm-display-elisp-inline identity) 238 ("application/emacs-lisp" mm-display-elisp-inline identity)
239 ("application/x-emacs-lisp" mm-display-elisp-inline identity) 239 ("application/x-emacs-lisp" mm-display-elisp-inline identity)
240 ("application/x-shellscript" mm-display-shell-script-inline identity)
241 ("application/x-sh" mm-display-shell-script-inline identity)
242 ("text/x-sh" mm-display-shell-script-inline identity)
240 ("text/dns" mm-display-dns-inline identity) 243 ("text/dns" mm-display-dns-inline identity)
244 ("text/org" mm-display-org-inline identity)
241 ("text/html" 245 ("text/html"
242 mm-inline-text-html 246 mm-inline-text-html
243 (lambda (handle) 247 (lambda (handle)
@@ -313,7 +317,8 @@ when selecting a different article."
313 "application/pkcs7-signature" "application/x-pkcs7-mime" 317 "application/pkcs7-signature" "application/x-pkcs7-mime"
314 "application/pkcs7-mime" 318 "application/pkcs7-mime"
315 ;; Mutt still uses this even though it has already been withdrawn. 319 ;; Mutt still uses this even though it has already been withdrawn.
316 "application/pgp\\'") 320 "application/pgp\\'"
321 "text/org")
317 "A list of MIME types to be displayed automatically." 322 "A list of MIME types to be displayed automatically."
318 :type '(repeat regexp) 323 :type '(repeat regexp)
319 :group 'mime-display) 324 :group 'mime-display)
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index 432b23c2029..69661225bd4 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -186,7 +186,15 @@ This can be either \"inline\" or \"attachment\".")
186 "^\\\\end{document}" 186 "^\\\\end{document}"
187 mm-uu-latex-extract 187 mm-uu-latex-extract
188 nil 188 nil
189 mm-uu-latex-test)) 189 mm-uu-latex-test)
190 (org-src-code-block
191 "^[ \t]*#\\+begin_"
192 "^[ \t]*#\\+end_"
193 mm-uu-org-src-code-block-extract)
194 (org-meta-line
195 "^[ \t]*#\\+[[:alpha:]]+: "
196 "$"
197 mm-uu-org-src-code-block-extract))
190 "A list of specifications for non-MIME attachments. 198 "A list of specifications for non-MIME attachments.
191Each element consist of the following entries: label, 199Each element consist of the following entries: label,
192start-regexp, end-regexp, extract-function, test-function. 200start-regexp, end-regexp, extract-function, test-function.
@@ -383,6 +391,10 @@ apply the face `mm-uu-extract'."
383 (list mm-dissect-disposition 391 (list mm-dissect-disposition
384 (cons 'filename file-name)))) 392 (cons 'filename file-name))))
385 393
394(defun mm-uu-org-src-code-block-extract ()
395 (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
396 '("text/org")))
397
386(defvar gnus-newsgroup-name) 398(defvar gnus-newsgroup-name)
387 399
388(defun mm-uu-emacs-sources-test () 400(defun mm-uu-emacs-sources-test ()
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 61d5b32b2c7..fa8c94c36b7 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -632,6 +632,14 @@
632(defun mm-display-dns-inline (handle) 632(defun mm-display-dns-inline (handle)
633 (mm-display-inline-fontify handle 'dns-mode)) 633 (mm-display-inline-fontify handle 'dns-mode))
634 634
635(defun mm-display-org-inline (handle)
636 "Show an Org mode text from HANDLE inline."
637 (mm-display-inline-fontify handle 'org-mode))
638
639(defun mm-display-shell-script-inline (handle)
640 "Show an shell script from HANDLE inline."
641 (mm-display-inline-fontify handle 'shell-script-mode))
642
635;; id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2) 643;; id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
636;; us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 } 644;; us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
637(defvar mm-pkcs7-signed-magic 645(defvar mm-pkcs7-signed-magic