瀏覽代碼

ox-md: Use cl-lib

* lisp/ox-md.el (org-md-item):
(org-md-link): Silence byte-compiler.
Nicolas Goaziou 8 年之前
父節點
當前提交
ef38f2ff44
共有 1 個文件被更改,包括 9 次插入9 次删除
  1. 9 9
      lisp/ox-md.el

+ 9 - 9
lisp/ox-md.el

@@ -28,7 +28,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(require 'cl-lib)
 (require 'ox-html)
 (require 'ox-publish)
 
@@ -266,10 +266,10 @@ a communication channel."
 			   "."))))
     (concat bullet
 	    (make-string (- 4 (length bullet)) ? )
-	    (case (org-element-property :checkbox item)
-	      (on "[X] ")
-	      (trans "[-] ")
-	      (off "[ ] "))
+	    (pcase (org-element-property :checkbox item)
+	      (`on "[X] ")
+	      (`trans "[-] ")
+	      (`off "[ ] "))
 	    (let ((tag (org-element-property :tag item)))
 	      (and tag (format "**%s:** "(org-export-data tag info))))
 	    (and contents
@@ -317,12 +317,12 @@ a communication channel."
       (let ((destination (if (string= type "fuzzy")
 			     (org-export-resolve-fuzzy-link link info)
 			   (org-export-resolve-id-link link info))))
-	(case (org-element-type destination)
-	  (plain-text			; External file.
+	(pcase (org-element-type destination)
+	  (`plain-text			; External file.
 	   (let ((path (funcall link-org-files-as-md destination)))
 	     (if (not contents) (format "<%s>" path)
 	       (format "[%s](%s)" contents path))))
-	  (headline
+	  (`headline
 	   (format
 	    "[%s](#%s)"
 	    ;; Description.
@@ -336,7 +336,7 @@ a communication channel."
 	    ;; Reference.
 	    (or (org-element-property :CUSTOM_ID destination)
 		(org-export-get-reference destination info))))
-	  (t
+	  (_
 	   (let ((description
 		  (or (org-string-nw-p contents)
 		      (let ((number (org-export-get-ordinal destination info)))