emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-mime 44e7a78ffd 019/118: Fix for cl-lib


From: ELPA Syncer
Subject: [nongnu] elpa/org-mime 44e7a78ffd 019/118: Fix for cl-lib
Date: Wed, 5 Jan 2022 07:58:43 -0500 (EST)

branch: elpa/org-mime
commit 44e7a78ffd3937632ab4a423c2b67eddcac53f42
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]