Mercurial > hg > xemacs-beta
diff lisp/x-font-menu.el @ 314:341dac730539 r21-0b55
Import from CVS: tag r21-0b55
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:44:22 +0200 |
parents | 41ff10fd062f |
children | 512e409c26a2 |
line wrap: on
line diff
--- a/lisp/x-font-menu.el Mon Aug 13 10:43:56 2007 +0200 +++ b/lisp/x-font-menu.el Mon Aug 13 10:44:22 2007 +0200 @@ -466,15 +466,18 @@ (from-size (aref font-data 2)) (from-weight (aref font-data 3)) (from-slant (aref font-data 4)) - new-default-face-font) + new-default-face-font + new-props) (unless from-family (signal 'error '("couldn't parse font name for default face"))) - (setq new-default-face-font - (font-menu-load-font (or family from-family) - (or weight from-weight) - (or size from-size) - from-slant - font-menu-preferred-resolution)) + (when weight + (signal 'error '("Setting weight currently not supported"))) +; (setq new-default-face-font +; (font-menu-load-font (or family from-family) +; (or weight from-weight) +; (or size from-size) +; from-slant +; font-menu-preferred-resolution)) (dolist (face (delq 'default (face-list))) (when (face-font-instance face) (message "Changing font of `%s'..." face) @@ -487,10 +490,16 @@ (sit-for 1))))) ;; Set the default face's font after hacking the other faces, so that ;; the frame size doesn't change until we are all done. - - ;;; WMP - we need to honor font-menu-this-frame-only-p here! - (set-face-font 'default new-default-face-font - (and font-menu-this-frame-only-p (selected-frame))) + + (when (and family (not (equal family from-family))) + (setq new-props (append (list :family family) new-props))) + (when (and size (not (equal size from-size))) + (setq new-props (append (list :size (int-to-string + (/ size 10))) new-props))) + (custom-set-face-update-spec 'default '((type x)) new-props) + ;;; WMP - we need to honor font-menu-this-frame-only-p here! +; (set-face-font 'default new-default-face-font +; (and font-menu-this-frame-only-p (selected-frame))) (message "Font %s" (face-font-name 'default))))