diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-07-25 15:55:16 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-07-25 15:55:16 +0200 |
commit | ef38f2ff44a945672248fcfc024617dcfa42312b (patch) | |
tree | dfe0aedca7f6776aef10d12e65bb9964df1351ac | |
parent | a8a9c286e9ff3e346c106c72f9992e0e8912d232 (diff) | |
download | org-mode-ef38f2ff44a945672248fcfc024617dcfa42312b.tar.gz |
ox-md: Use cl-lib
* lisp/ox-md.el (org-md-item):
(org-md-link): Silence byte-compiler.
-rw-r--r-- | lisp/ox-md.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/ox-md.el b/lisp/ox-md.el index 8c8efe0..7635fc7 100644 --- a/lisp/ox-md.el +++ b/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))) |