Fix build failure for muse-ikiwiki.
[muse-el.git] / contrib / htmlize-hack.el
blob4c9e5e8f57d9c7742f532d03eba695ddfb288357
1 ;; This file provides a fix for htmlize.el and Emacs 23.
2 ;; To use it, add the path to this directory to your load path and
3 ;; add (require 'htmlize-hack) to your Emacs init file.
5 (require 'htmlize)
7 (when (equal htmlize-version "1.34")
8 (defun htmlize-face-size (face)
9 ;; The size (height) of FACE, taking inheritance into account.
10 ;; Only works in Emacs 21 and later.
11 (let ((size-list
12 (loop
13 for f = face then (face-attribute f :inherit)
14 until (or (null f) (eq f 'unspecified))
15 for h = (face-attribute f :height)
16 collect (if (eq h 'unspecified) nil h))))
17 (reduce 'htmlize-merge-size (cons nil size-list)))))
19 (provide 'htmlize-hack)