;;; htmlfontify.el --- htmlize a buffer/source tree with optional hyperlinks
-;; Copyright (C) 2002-2003, 2009-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2003, 2009-2016 Free Software Foundation, Inc.
;; Emacs Lisp Archive Entry
;; Package: htmlfontify
\(defun rtfm-build-source-docs (section srcdir destdir)
(interactive
\"s section[eg- emacs / p4-blame]:\\nD source-dir: \\nD output-dir: \")
- (require 'htmlfontify)
+ (require \\='htmlfontify)
(hfy-load-tags-cache srcdir)
- (let ((hfy-page-header 'rtfm-build-page-header)
- (hfy-page-footer 'rtfm-build-page-footer)
+ (let ((hfy-page-header \\='rtfm-build-page-header)
+ (hfy-page-footer \\='rtfm-build-page-footer)
(rtfm-section section)
(hfy-index-file \"index\"))
(htmlfontify-run-etags srcdir)
:type '(string))
(defcustom hfy-src-doc-link-style "text-decoration: underline;"
- "String to add to the ‘<style> a’ variant of an htmlfontify CSS class."
+ "String to add to the `<style> a' variant of an htmlfontify CSS class."
:group 'htmlfontify
:tag "src-doc-link-style"
:type '(string))
(defcustom hfy-src-doc-link-unstyle " text-decoration: none;"
- "Regex to remove from the ‘<style> a’ variant of an htmlfontify CSS class."
+ "Regex to remove from the `<style> a' variant of an htmlfontify CSS class."
:group 'htmlfontify
:tag "src-doc-link-unstyle"
:type '(string))
:type '(hook))
(defcustom hfy-default-face-def nil
- "Fallback `defface' specification for the face 'default, used when
+ "Fallback `defface' specification for the face `default', used when
`hfy-display-class' has been set (the normal htmlfontify way of extracting
potentially non-current face information doesn't necessarily work for
-'default).\n
+`default').\n
Example: I customize this to:\n
\((t :background \"black\" :foreground \"white\" :family \"misc-fixed\"))"
:group 'htmlfontify
are running Emacs on a tty or in batch mode, and want htmlfontify to have
access to the face spec you would use if you were connected to an X display.\n
Some valid class specification elements are:\n
- '(class color)
- '(class grayscale)
- '(background dark)
- '(background light)
- '(type x-toolkit)
- '(type tty)
- '(type motif)
- '(type lucid)
+ (class color)
+ (class grayscale)
+ (background dark)
+ (background light)
+ (type x-toolkit)
+ (type tty)
+ (type motif)
+ (type lucid)
Multiple values for a tag may be combined, to indicate that any one or more
of these values in the specification key constitutes a match, eg:\n
-'((class color grayscale) (type tty)) would match any of:\n
- '((class color))
- '((class grayscale))
- '((class color grayscale))
- '((class color foo))
- '((type tty))
- '((type tty) (class color))\n
+((class color grayscale) (type tty)) would match any of:\n
+ ((class color))
+ ((class grayscale))
+ ((class color grayscale))
+ ((class color foo))
+ ((type tty))
+ ((type tty) (class color))\n
and so on."
:type '(alist :key-type (symbol) :value-type (symbol))
:group 'htmlfontify
to use, to the best of my understanding).\n
If CLASS is nil, then you just get whatever `face-attr-construct' returns,
ie the current specification in effect for FACE.\n
-*NOTE*: This function forces any face that is not 'default and which has
-no :inherit property to inherit from 'default (this is because 'default
+*NOTE*: This function forces any face that is not `default' and which has
+no :inherit property to inherit from `default' (this is because `default'
is magical in that Emacs's fonts behave as if they inherit implicitly from
-'default, but no such behavior exists in HTML/CSS).\n
+`default', but no such behavior exists in HTML/CSS).\n
See also `hfy-display-class' for details of valid values for CLASS."
(let ((face-spec
(if class
(append
parent
(hfy-face-to-style-i
- (hfy-face-attr-for-class v hfy-display-class)) ))))
+ (hfy-face-attr-for-class v hfy-display-class))))))
(setq this
(if val (case key
(:family (hfy-family val))
(:italic (hfy-slant 'italic))))))
(setq that (hfy-face-to-style-i next))
;;(lwarn t :warning "%S => %S" fn (nconc this that parent))
- (nconc this that parent))) )
+ (nconc this parent that))) )
(defun hfy-size-to-int (spec)
"Convert SPEC, a CSS font-size specifier, to an Emacs :height attribute value.
(nconc r (hfy-size (if x (round n) (* n 1.0)))) ))
(defun hfy-face-resolve-face (fn)
+ "For FN return a face specification.
+FN may be either a face or a face specification. If the latter,
+then the specification is returned unchanged."
(cond
((facep fn)
(hfy-face-attr-for-class fn hfy-display-class))
+ ;; FIXME: is this necessary? Faces can be symbols, but
+ ;; not symbols refering to other symbols?
((and (symbolp fn)
(facep (symbol-value fn)))
- (hfy-face-attr-for-class (symbol-value fn) hfy-display-class))
- (t nil)))
+ (hfy-face-attr-for-class
+ (symbol-value fn) hfy-display-class))
+ (t fn)))
(defun hfy-face-to-style (fn)
(defvar hfy-face-to-css 'hfy-face-to-css-default
"Handler for mapping faces to styles.
-The signature of the handler is of the form \(lambda (FN) ...\).
+The signature of the handler is of the form \(lambda (FN) ...).
FN is a font or `defface' specification (cf
`face-attr-construct'). The handler should return a cons cell of
the form (STYLE-NAME . STYLE-SPEC).
(defvar hfy-begin-span-handler 'hfy-begin-span
"Handler to begin a span of text.
The signature of the handler is \(lambda (STYLE TEXT-BLOCK
-TEXT-ID TEXT-BEGINS-BLOCK-P) ...\). The handler must insert
+TEXT-ID TEXT-BEGINS-BLOCK-P) ...). The handler must insert
appropriate tags to begin a span of text.
STYLE is the name of the style that begins at point. It is
(defvar hfy-end-span-handler 'hfy-end-span
"Handler to end a span of text.
-The signature of the handler is \(lambda () ...\). The handler
+The signature of the handler is \(lambda () ...). The handler
must insert appropriate tags to end a span of text.
The default handler is `hfy-end-span'.")
(load file 'NOERROR nil nil) ))
\f
-;;;### (autoloads nil "hfy-cmap" "hfy-cmap.el" "ce07a28b93c09032fd6b225ad74be0df")
+;;;### (autoloads nil "hfy-cmap" "hfy-cmap.el" "e644ddae915ddb98c9b2f16ffa5a74b2")
;;; Generated autoloads from hfy-cmap.el
(autoload 'htmlfontify-load-rgb-file "hfy-cmap" "\
(provide 'htmlfontify)
-;; Local Variables:
-;; coding: utf-8
-;; End:
-
;;; htmlfontify.el ends here