summaryrefslogtreecommitdiff
path: root/lisp/hfy-cmap.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2010-04-23 19:36:43 -0700
committerGlenn Morris <rgm@gnu.org>2010-04-23 19:36:43 -0700
commitcbcfee6ef444ccb578b31417a836e9de98d566ba (patch)
treedb257eb100c9ac7c4c3e3b18261007bb5d8ee886 /lisp/hfy-cmap.el
parent48cd4175158c8f2da2f97df6b3b8dd0e0e59d9c4 (diff)
downloademacs-cbcfee6ef444ccb578b31417a836e9de98d566ba.tar.gz
emacs-cbcfee6ef444ccb578b31417a836e9de98d566ba.tar.bz2
emacs-cbcfee6ef444ccb578b31417a836e9de98d566ba.zip
Minor htmlfontify simplifications.
* hfy-cmap.el (htmlfontify-load-rgb-file, hfy-fallback-colour-values): Add autoload cookies. (htmlfontify-unload-rgb-file, hfy-fallback-colour-values): Add docs. (generated-autoload-file): Set file-local value to "htmlfontify.el". * htmlfontify.el (caddr, cadddr): Remove fallback definitions. They have definitions / compiler macros in cl.el. (htmlfontify-load-rgb-file, hfy-fallback-colour-values): Replace manual autoloads with generated ones. (htmlfontify-unload-rgb-file): Remove autoload.
Diffstat (limited to 'lisp/hfy-cmap.el')
-rw-r--r--lisp/hfy-cmap.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/hfy-cmap.el b/lisp/hfy-cmap.el
index fc5359e1f65..0eff90d2298 100644
--- a/lisp/hfy-cmap.el
+++ b/lisp/hfy-cmap.el
@@ -803,6 +803,7 @@
(defconst hfy-rgb-regex
"^\\s-*\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\(.+\\)\\s-*$")
+;;;###autoload
(defun htmlfontify-load-rgb-file (&optional file)
"Load an X11 style rgb.txt FILE.
Search `hfy-rgb-load-path' if FILE is not specified.
@@ -832,14 +833,21 @@ Loads the variable `hfy-rgb-txt-colour-map', which is used by
(kill-buffer rgb-buffer)))))
(defun htmlfontify-unload-rgb-file ()
+ "Unload the current color name -> rgb translation map."
(interactive)
(setq hfy-rgb-txt-colour-map nil))
+;;;###autoload
(defun hfy-fallback-colour-values (colour-string)
+ "Use a fallback method for obtaining the rgb values for a color."
(cdr (assoc-string colour-string (or hfy-rgb-txt-colour-map
hfy-fallback-colour-map))) )
(provide 'hfy-cmap)
-;;; hfy-cmap.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "htmlfontify.el"
+;; End:
;; arch-tag: dff7feea-add4-48ba-937c-e79ac40cec9b
+;;; hfy-cmap.el ends here