comparison lisp/enriched.el @ 27792:de64340fea42

(enriched-face-ans): Handle '(foreground-color . COLOR) and (background-color . COLOR).
author Gerd Moellmann <gerd@gnu.org>
date Mon, 21 Feb 2000 12:57:42 +0000
parents cbe304a26771
children 7f4fe6e367dc
comparison
equal deleted inserted replaced
27791:e2de8c3d9332 27792:de64340fea42
346 (cons (and old (enriched-face-ans old)) 346 (cons (and old (enriched-face-ans old))
347 (and new (enriched-face-ans new)))) 347 (and new (enriched-face-ans new))))
348 348
349 (defun enriched-face-ans (face) 349 (defun enriched-face-ans (face)
350 "Return annotations specifying FACE." 350 "Return annotations specifying FACE."
351 (cond ((string-match "^fg:" (symbol-name face)) 351 (cond ((and (consp face) (eq (car face) 'foreground-color))
352 (list "x-color" (cdr face)))
353 ((and (consp face) (eq (car face) 'background-color))
354 (list "x-bg-color" (cdr face)))
355 ((string-match "^fg:" (symbol-name face))
352 (list (list "x-color" (substring (symbol-name face) 3)))) 356 (list (list "x-color" (substring (symbol-name face) 3))))
353 ((string-match "^bg:" (symbol-name face)) 357 ((string-match "^bg:" (symbol-name face))
354 (list (list "x-bg-color" (substring (symbol-name face) 3)))) 358 (list (list "x-bg-color" (substring (symbol-name face) 3))))
355 ((let* ((fg (face-foreground face)) 359 ((let* ((fg (face-foreground face))
356 (bg (face-background face)) 360 (bg (face-background face))