Function: hfy-compile-stylesheet
hfy-compile-stylesheet is a byte-compiled function defined in
htmlfontify.el.gz.
Signature
(hfy-compile-stylesheet)
Documentation
Trawl the current buffer, construct and return a hfy-sheet-assoc.
If hfy-user-sheet-assoc is currently bound then use it to
collect new styles discovered during this run. Otherwise create
a new assoc.
Source Code
;; Defined in /usr/src/emacs/lisp/htmlfontify.el.gz
;; construct an assoc of (face-name . (css-name . "{ css-style }")) elements:
(defun hfy-compile-stylesheet ()
"Trawl the current buffer, construct and return a `hfy-sheet-assoc'.
If `hfy-user-sheet-assoc' is currently bound then use it to
collect new styles discovered during this run. Otherwise create
a new assoc."
;;(message "hfy-compile-stylesheet");;DBUG
(let ((pt (point-min))
;; Make the font stack stay:
;;(hfy-tmpfont-stack nil)
(fn nil)
(style (and (boundp 'hfy-user-sheet-assoc) hfy-user-sheet-assoc)))
(save-excursion
(goto-char pt)
(while (< pt (point-max))
(if (and (setq fn (hfy-face-at pt)) (not (assoc fn style)))
(push (cons fn (funcall hfy-face-to-css fn)) style))
(setq pt (next-char-property-change pt))))
(unless (assoc 'default style)
(push (cons 'default (funcall hfy-face-to-css 'default)) style))
(when (boundp 'hfy-user-sheet-assoc)
(setq hfy-user-sheet-assoc style))
style))