summaryrefslogtreecommitdiff
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-01-09 14:11:12 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-01-09 14:11:12 +0000
commit95ac8fbdcade74dd6030e882d83f8afca18851ad (patch)
treecc809d700e4c4a89880ae77bb78cb33599100816 /lisp/faces.el
parent45c17811844c8568f6f231bd958196ef43fa83f6 (diff)
downloademacs-95ac8fbdcade74dd6030e882d83f8afca18851ad.tar.gz
(face-valid-attribute-values): Use string as value for :family
attribute. Now, font-family-list returns a list of strings. (x-font-family-list): Obsolete compatibility version of function from xfaces.c.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 20648bc574d..4c98423a8a1 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -988,7 +988,7 @@ an integer value."
(case attribute
(:family
(if (window-system frame)
- (mapcar #'(lambda (x) (cons (symbol-name x) x))
+ (mapcar (lambda (x) (cons x x))
(font-family-list))
;; Only one font on TTYs.
(list (cons "default" "default"))))
@@ -2681,6 +2681,18 @@ If that can't be done, return nil."
(internal-frob-font-slant font "i")))
(make-obsolete 'x-make-font-bold-italic 'make-face-bold-italic "21.1")
+(defun x-font-family-list (&optional frame)
+ "Return a list of available font families on FRAME.
+If FRAME is omitted or nil, use the selected frame.
+Value is a list of conses (FAMILY . FIXED-P) where FAMILY
+is a font family, and FIXED-P is non-nil if fonts of that family
+are fixed-pitch."
+ (if (fboundp 'font-family-list)
+ (mapcar (lambda (family) (cons family nil))
+ (font-family-list))
+ '(("default" . t))))
+(make-obsolete 'x-font-family-list 'font-family-list "23.1")
+
(provide 'faces)
;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6