Charles G Waldman <cgw(a)pgt.com> writes:
I'll try to work on a fix, but would appreciate guidance from
somebody
who understands Customize a little better than I do.
1998-10-07 Jan Vroonhof <vroonhof(a)math.ethz.ch>
* x-font-menu.el (font-menu-set-font): Respect font-menu-frame-local
Index: x-font-menu.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/lisp/x-font-menu.el,v
retrieving revision 1.3
diff -u -u -r1.3 x-font-menu.el
--- x-font-menu.el 1998/09/10 00:06:54 1.3
+++ x-font-menu.el 1998/10/08 00:51:08
@@ -472,12 +472,12 @@
(signal 'error '("couldn't parse font name for default
face")))
(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))
+ (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)
@@ -490,17 +490,20 @@
(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.
-
- (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 10)) "pt")) 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))))
+
+ ;; If we need to be frame local we do the changes ourselves.
+ (if font-menu-this-frame-only-p
+ ;;; 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)))
+ ;; OK Let Customize do it.
+ (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 10)) "pt")) new-props)))
+ (custom-set-face-update-spec 'default '((type x)) new-props)
+ (message "Font %s" (face-font-name 'default)))))
(defun font-menu-change-face (face