Browse Source

org-odt.el: Declare vars and functions from htmlfontify

Jambunathan K 13 years ago
parent
commit
9164b48f69
1 changed files with 7 additions and 4 deletions
  1. 7 4
      lisp/org-odt.el

+ 7 - 4
lisp/org-odt.el

@@ -27,10 +27,7 @@
 
 
 ;;; Code:
 ;;; Code:
 (eval-when-compile
 (eval-when-compile
-  (require 'cl)
-  ;; htmlfontify.el was introduce in Emacs 23.2
-  (when (>= (string-to-number emacs-version) 23.2)
-    (require 'htmlfontify)))
+  (require 'cl))
 (require 'org-lparse)
 (require 'org-lparse)
 
 
 (defgroup org-export-odt nil
 (defgroup org-export-odt nil
@@ -1195,6 +1192,10 @@ This style is much the same as that of \"OrgFixedWidthBlock\"
 except that the foreground and background colors are set
 except that the foreground and background colors are set
 according to the default face identified by the `htmlfontify'.")
 according to the default face identified by the `htmlfontify'.")
 
 
+(defvar hfy-optimisations)
+(declare-function hfy-face-to-style "htmlfontify" (fn))
+(declare-function hfy-face-or-def-to-name "htmlfontify" (fn))
+
 (defun org-odt-hfy-face-to-css (fn)
 (defun org-odt-hfy-face-to-css (fn)
   "Create custom style for face FN.
   "Create custom style for face FN.
 When FN is the default face, use it's foreground and background
 When FN is the default face, use it's foreground and background
@@ -1297,6 +1298,8 @@ value of `org-export-odt-fontify-srcblocks."
 	lines (funcall
 	lines (funcall
 	       (or (and org-export-odt-fontify-srcblocks
 	       (or (and org-export-odt-fontify-srcblocks
 			(or (featurep 'htmlfontify)
 			(or (featurep 'htmlfontify)
+			    ;; htmlfontify.el was introduced in Emacs 23.2
+			    ;; So load it with some caution
 			    (require 'htmlfontify nil t))
 			    (require 'htmlfontify nil t))
 			(fboundp 'htmlfontify-string)
 			(fboundp 'htmlfontify-string)
 			'org-odt-format-source-code-or-example-colored)
 			'org-odt-format-source-code-or-example-colored)