Function: htmlfontify-buffer
htmlfontify-buffer is an autoloaded, interactive and byte-compiled
function defined in htmlfontify.el.gz.
Signature
(htmlfontify-buffer &optional SRCDIR FILE)
Documentation
Create a new buffer, named for the current buffer + a .html extension, containing an inline CSS-stylesheet and formatted CSS-markup HTML that reproduces the look of the current Emacs buffer as closely as possible.
Dangerous characters in the existing buffer are turned into HTML entities, so you should even be able to do HTML-within-HTML fontified display.
You should, however, note that random control or non-ASCII characters such as ^L (U+000C FORM FEED (FF)) or ¤ (U+00A4 CURRENCY SIGN) won't get mapped yet.
If the SRCDIR and FILE arguments are set, lookup etags derived
entries in the hfy-tags-cache and add HTML anchors and
hyperlinks as appropriate.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/htmlfontify.el.gz
;;;###autoload
(defun htmlfontify-buffer (&optional srcdir file)
"Create a new buffer, named for the current buffer + a .html extension,
containing an inline CSS-stylesheet and formatted CSS-markup HTML
that reproduces the look of the current Emacs buffer as closely
as possible.
Dangerous characters in the existing buffer are turned into HTML
entities, so you should even be able to do HTML-within-HTML
fontified display.
You should, however, note that random control or non-ASCII
characters such as ^L (U+000C FORM FEED (FF)) or ¤ (U+00A4
CURRENCY SIGN) won't get mapped yet.
If the SRCDIR and FILE arguments are set, lookup etags derived
entries in the `hfy-tags-cache' and add HTML anchors and
hyperlinks as appropriate."
(interactive)
;; pick up the file name in case we didn't receive it
(if (not file)
(progn (setq file (or (buffer-file-name) (buffer-name)))
(if (string-match "/\\([^/]*\\)\\'" file)
(setq file (match-string 1 file)))) )
(if (not (hfy-opt 'skip-refontification))
(font-lock-ensure))
(if (called-interactively-p 'any) ;; display the buffer in interactive mode:
(switch-to-buffer (hfy-fontify-buffer srcdir file))
(hfy-fontify-buffer srcdir file)))