X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Ffont-menu.el;h=c406ddcf91dd5d30fd1f51f1f56230f730d6fcdf;hb=34360e98c9689b0a7eedab93e14df13281141bbd;hp=0103764453c276a3b84130c2dbf22bed3fc907f4;hpb=2416430cb588c7f7a7ca990d536c092f3af3a0b9;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/font-menu.el b/lisp/font-menu.el index 0103764..c406ddc 100644 --- a/lisp/font-menu.el +++ b/lisp/font-menu.el @@ -395,15 +395,14 @@ or if you change your font path, you can call this to re-initialize the menus." (set-face-font 'default new-default-face-font (and font-menu-this-frame-only-p (selected-frame))) ;; OK Let Customize do it. - (custom-set-face-update-spec 'default - (list (list 'type (device-type))) - (list :family family - :size (concat - (int-to-string - (/ size - (specifier-instance font-menu-size-scaling - (selected-device)))) - "pt"))) + (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 (concat (int-to-string (/ size (specifier-instance + font-menu-size-scaling + (selected-device)))) "pt")) new-props))) + (custom-set-face-update-spec 'default '((type x)) new-props) (message "Font %s" (face-font-name 'default)))))