Tiny refactoring

* lisp/org.el: (org-dvipng-color, org-latex-color): Use *-color-format
functions.
(org-dvipng-color-format, org-latex-color-format): Use sharp-quotes.
This commit is contained in:
Aaron Ecay 2016-09-25 17:04:19 +01:00
parent 2e4b66f5f5
commit d00d44d6ff
1 changed files with 4 additions and 8 deletions

View File

@ -19559,25 +19559,21 @@ SNIPPETS-P indicates if this is run to create snippet images for HTML."
(defun org-dvipng-color (attr)
"Return a RGB color specification for dvipng."
(apply #'format "rgb %s %s %s"
(mapcar #'org-normalize-color
(color-values (face-attribute 'default attr nil)))))
(org-dvipng-color-format (face-attribute 'default attr nil)))
(defun org-dvipng-color-format (color-name)
"Convert COLOR-NAME to a RGB color value for dvipng."
(apply 'format "rgb %s %s %s"
(apply #'format "rgb %s %s %s"
(mapcar 'org-normalize-color
(color-values color-name))))
(defun org-latex-color (attr)
"Return a RGB color for the LaTeX color package."
(apply #'format "%s,%s,%s"
(mapcar #'org-normalize-color
(color-values (face-attribute 'default attr nil)))))
(org-latex-color-format (face-attribute 'default attr nil)))
(defun org-latex-color-format (color-name)
"Convert COLOR-NAME to a RGB color value."
(apply 'format "%s,%s,%s"
(apply #'format "%s,%s,%s"
(mapcar 'org-normalize-color
(color-values color-name))))