Mercurial > hg > xemacs-beta
diff lisp/font-menu.el @ 3918:049dc907c17a
[xemacs-hg @ 2007-04-22 19:58:27 by aidan]
Make the X11 font menu work again, server side X11 with Mule.
author | aidan |
---|---|
date | Sun, 22 Apr 2007 19:58:59 +0000 |
parents | ad2f4ae9895b |
children | 3889ef128488 308d34e9f07d |
line wrap: on
line diff
--- a/lisp/font-menu.el Sun Apr 22 09:24:12 2007 +0000 +++ b/lisp/font-menu.el Sun Apr 22 19:58:59 2007 +0000 @@ -365,14 +365,33 @@ (/ (or size from-size) (specifier-instance font-menu-size-scaling (selected-device)))) - "pt")))) + "pt"))) + new-spec-list) + ;; If the font was initialised from X resources (the tag-set + ;; contains 'x-resource) pretend to Custom that it has + ;; responsibility for those settings. + (map-specifier (face-font 'default) + (lambda (spec locale inst-list arg) + (loop + for (tag-set . inst) + in inst-list + do (setq tag-set (delq 'x-resource tag-set) + tag-set (delq 'custom tag-set) + tag-set (cons 'custom tag-set)) + (push (cons tag-set inst) new-spec-list) + ;; Need to return nil, else map-specifier stops + finally return nil)) + nil nil '(x-resource)) + (remove-specifier (face-font 'default) nil '(x-resource)) + (when new-spec-list + (add-spec-list-to-specifier (face-font 'default) + (list (cons 'global new-spec-list)))) (custom-set-face-update-spec 'default (list (list 'type (device-type))) (list :family (or family from-family) :size fsize)))) (message "Font %s" (face-font-name 'default)))) - ;; #### This should be called `font-menu-maybe-change-face' ;; I wonder if a better API wouldn't (face attribute from to) (defun font-menu-change-face (face