[Use emacs face names instead of explicit colors in htmlize for muse clinton@unknownlamer.org**20090129074150 Ignore-this: b58485e204e15c5ec80eaa8db06984a0 It's not so hard to style the most commonly used faces, and this gives me more control over the screen vs print style of my website. ] { hunk ./init.d/muse.el 223 + +(setq htmlize-css-name-prefix "emacs-face-") + +(defun htmlize-region-for-paste (beg end) + "Htmlize the region and return just the HTML as a string. +This forces the `inline-css' style and only returns the HTML body, +but without the BODY tag. This should make it useful for inserting +the text to another HTML buffer." + (let* ((htmlize-output-type 'css) + (htmlbuf (htmlize-region beg end))) + (unwind-protect + (with-current-buffer htmlbuf + (buffer-substring (plist-get htmlize-buffer-places 'content-start) + (plist-get htmlize-buffer-places 'content-end))) + (kill-buffer htmlbuf)))) hunk ./site-lisp/htmlize.el 870 - until (eq f 'unspecified) + until (or (not f) (eq f 'unspecified)) }