Martin Rubey <[EMAIL PROTECTED]> writes:
...
> Below is what I have so far.  One thing I'm stuck with: how can I allow the
> user to change the face, or at least the color?
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> (defface axiom-output-paint '((t (:background "lightblue")))
>   "Face to use for painting."
>   :group 'axiom)

Perhaps you could make axiom-output-paint a variable; something like:

(defface axiom-output-blue '((t (:background "blue")))
   "Blue face to use for painting."
   :group 'axiom)

(defface axiom-output-lightblue '((t (:background "lightblue")))
   "Light blue face to use for painting."
   :group 'axiom)

(defface axiom-output-red '((t (:background "red")))
   "Red face to use for painting."
   :group 'axiom)

etc.  (which are automatically customizable)

(defvar axiom-output-face-alist
  '(("blue" . axiom-output-blue)
    ("lightblue" . axiom-output-lightblue)
    ("red"  . axiom-output-red)
    ...))

(defvar axiom-output-paint 'axiom-output-lightblue)

(defun axiom-output-change-paint ()
  (interactive)
  (let ((newpaint (completing-read "New paint: " 
                                   axiom-output-face-alist
                                   nil t)))
    (setq axiom-output-paint (cdr (assoc newpaint axiom-output-face-alist)))))

and then the end of 

> (defun make-space-if-necessary-and-paint ()

could be

>     (overlay-put over 'face 
>                       (get axiom-output-paint 'face-defface-spec))))

Jay


_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to