Use "cl-lib"

This commit is contained in:
IGARASHI Masanao
2016-06-08 01:28:20 +09:00
parent 6bfbce5d9f
commit 5bd94b7e3b

View File

@@ -28,7 +28,7 @@
;;; Code: ;;; Code:
(eval-when-compile (require 'cl)) (require 'cl-lib)
(require 'ox) (require 'ox)
(require 'ox-publish) (require 'ox-publish)
(require 'ox-ascii) (require 'ox-ascii)
@@ -433,7 +433,7 @@ INFO is a plist used as a communication channel."
; (on (if utf8p "☑ " "[X] ")) ; (on (if utf8p "☑ " "[X] "))
; (off (if utf8p "☐ " "[ ] ")) ; (off (if utf8p "☐ " "[ ] "))
; (trans (if utf8p "☒ " "[-] "))))) ; (trans (if utf8p "☒ " "[-] ")))))
(case (org-element-property :checkbox item) (cl-case (org-element-property :checkbox item)
(on "") (on "")
(off "") (off "")
(trans ""))) (trans "")))
@@ -919,10 +919,10 @@ if its description is a single link targeting an image file."
(org-element-map (org-element-contents link) (org-element-map (org-element-contents link)
(cons 'plain-text org-element-all-objects) (cons 'plain-text org-element-all-objects)
(lambda (obj) (lambda (obj)
(case (org-element-type obj) (cl-case (org-element-type obj)
(plain-text (org-string-nw-p obj)) (plain-text (org-string-nw-p obj))
(link (if (= link-count 1) t (link (if (= link-count 1) t
(incf link-count) (cl-incf link-count)
(not (org-export-inline-image-p (not (org-export-inline-image-p
obj (plist-get info :rst-inline-image-rules))))) obj (plist-get info :rst-inline-image-rules)))))
(otherwise t))) (otherwise t)))
@@ -1033,7 +1033,7 @@ INFO is a plist holding contextual information."
(let ((destination (if (string= type "fuzzy") (let ((destination (if (string= type "fuzzy")
(org-export-resolve-fuzzy-link link info) (org-export-resolve-fuzzy-link link info)
(org-export-resolve-id-link link info)))) (org-export-resolve-id-link link info))))
(case (org-element-type destination) (cl-case (org-element-type destination)
;; Id link points to an external file. ;; Id link points to an external file.
(plain-text (plain-text
(if desc (format "`%s <%s>`_" desc destination) (if desc (format "`%s <%s>`_" desc destination)
@@ -1176,7 +1176,7 @@ containing export options. Modify DATA by side-effect and return it."
(function (function
;; Non-nil when OBJ can be added to the latex math block. ;; Non-nil when OBJ can be added to the latex math block.
(lambda (obj) (lambda (obj)
(case (org-element-type obj) (cl-case (org-element-type obj)
(entity (org-element-property :latex-math-p obj)) (entity (org-element-property :latex-math-p obj))
(latex-fragment (latex-fragment
(let ((value (org-element-property :value obj))) (let ((value (org-element-property :value obj)))