branch: elpa/org-mime
commit 44e7a78ffd3937632ab4a423c2b67eddcac53f42
Author: Syohei YOSHIDA <[email protected]>
Commit: Syohei YOSHIDA <[email protected]>
Fix for cl-lib
- Update requirements list
- Use cl-lib macro instead of cl.el
- Use cl-lables instead of flet
---
org-mime.el | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/org-mime.el b/org-mime.el
index 44e0411609..2fafa7f51d 100644
--- a/org-mime.el
+++ b/org-mime.el
@@ -7,6 +7,7 @@
;; Keywords: mime, mail, email, html
;; Homepage: http://github.com/org-mime/org-mime
;; Version: 0.0.4
+;; Package-Requires: ((cl-lib "0.5"))
;; This file is not part of GNU Emacs.
@@ -132,7 +133,7 @@ buffer holding\nthe text to be exported.")
(defun org-mime-file (ext path id)
"Markup a file wth EXT, PATH and ID for attachment."
(if org-mime-debug (message "org-mime-file called => %s %s %s" ext path id))
- (case org-mime-library
+ (cl-case org-mime-library
(mml (format (concat "<#part type=\"%s\" filename=\"%s\" "
"disposition=inline id=\"<%s>\">\n<#/part>\n")
ext path id))
@@ -150,7 +151,7 @@ buffer holding\nthe text to be exported.")
(defun org-mime-multipart (plain html &optional images)
"Markup a multipart/alternative PLAIN with PLAIN and HTML alternatives.
If html portion of message includes IMAGES they are wrapped in
multipart/related part."
- (case org-mime-library
+ (cl-case org-mime-library
(mml (concat "<#multipart type=alternative><#part type=text/plain>"
plain
(when images "<#multipart type=related>")
@@ -259,15 +260,15 @@ If ARG is not NIL, use `org-mime-fixedwith-wrap' to wrap
the exported text."
(require 'message))
(message-mail nil subject nil nil)
(message-goto-body)
- (flet ((bhook (body fmt)
- (let ((hook 'org-mime-pre-html-hook))
- (if (> (eval `(length ,hook)) 0)
- (with-temp-buffer
- (insert body)
- (goto-char (point-min))
- (eval `(run-hooks ',hook))
- (buffer-string))
- body))))
+ (cl-labels ((bhook (body fmt)
+ (let ((hook 'org-mime-pre-html-hook))
+ (if (> (eval `(length ,hook)) 0)
+ (with-temp-buffer
+ (insert body)
+ (goto-char (point-min))
+ (eval `(run-hooks ',hook))
+ (buffer-string))
+ body))))
(let* ((org-link-file-path-type 'absolute)
(plain (org-export-string-as (org-babel-trim body) 'ascii t nil))
;; we probably don't want to export a huge style file