]> code.delx.au - gnu-emacs/commitdiff
Fix an instance of dynamic-setting.el clobbering the default face.
authorChong Yidong <cyd@gnu.org>
Sun, 29 Jan 2012 13:55:09 +0000 (21:55 +0800)
committerChong Yidong <cyd@gnu.org>
Sun, 29 Jan 2012 13:55:09 +0000 (21:55 +0800)
* lisp/dynamic-setting.el (font-setting-change-default-font): Don't
change the default face if SET-FONT argument is non-nil.

Fixes: debbugs:9982
lisp/ChangeLog
lisp/dynamic-setting.el

index 24b8d2aed98293fdb7433fd6cb5c627f55907ed4..1d3bb0b50bf2f853f1e6009c2fe54bf2c2a83d40 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-29  Chong Yidong  <cyd@gnu.org>
+
+       * dynamic-setting.el (font-setting-change-default-font): Don't
+       change the default face if SET-FONT argument is non-nil (Bug#9982).
+
 2012-01-29  Samuel Bronson  <naesten@gmail.com>  (tiny change)
 
        * custom.el (defcustom): Add doc link to Lisp manual (Bug#10635).
index 8343d389f800dc751eea48249a458275767836d3..e04af7800fccadd0a5044c80c044293165ebebb1 100644 (file)
@@ -74,9 +74,10 @@ current form for the frame (i.e. hinting or somesuch changed)."
                                        :font font-to-set))))))
 
       ;; Set for future frames.
-      (set-face-attribute 'default t :font new-font)
-      (let ((spec (list (list t (face-attr-construct 'default)))))
-       (progn
+      (when set-font
+       ;; FIXME: this is not going to play well with Custom themes.
+       (set-face-attribute 'default t :font new-font)
+       (let ((spec (list (list t (face-attr-construct 'default)))))
          (put 'default 'customized-face spec)
          (custom-push-theme 'theme-face 'default 'user 'set spec)
          (put 'default 'face-modified nil))))))