GNU bug report logs -
#9982
M-x load-theme does not change background color
Previous Next
Full log
Message #56 received at 9982 <at> debbugs.gnu.org (full text, mbox):
I've committed a patch to trunk that should fix the immediate problem.
The reason this bug triggered under XFCE is that XFCE sends Emacs a
`font-render' config event, and a font-setting-change-default-font bug
caused the default face to be modified even with font-use-system-font
nil.
This patch doesn't address the broader problem, noted in my previous
message: when font-use-system-font is non-nil, the way
font-setting-change-default-font uses custom-push-theme will likely
interefere with the user's own Custom settings and/or Custom themes.
I think that instead of using custom-push-theme,
font-setting-change-default-font should set a `font' frame parameter in
window-system-default-frame-alist. Something like the following (needs
testing---I don't have Gconf libs installed at the moment).
Jan, WDYT?
=== modified file 'lisp/dynamic-setting.el'
*** lisp/dynamic-setting.el 2012-01-29 13:55:09 +0000
--- lisp/dynamic-setting.el 2012-01-29 14:09:40 +0000
***************
*** 75,86 ****
;; Set for future frames.
(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))))))
(defun dynamic-setting-handle-config-changed-event (event)
"Handle config-changed-event on the display in EVENT.
--- 75,88 ----
;; Set for future frames.
(when set-font
! (let* ((ws (window-system))
! (alist (assq ws window-system-default-frame-alist)))
! (setq window-system-default-frame-alist
! (delq alist window-system-default-frame-alist))
! (setq alist (cdr alist))
! (setq alist (cons (cons 'font new-font)
! (delq 'font alist)))
! (push (cons ws alist) window-system-default-frame-alist))))))
(defun dynamic-setting-handle-config-changed-event (event)
"Handle config-changed-event on the display in EVENT.
This bug report was last modified 13 years and 114 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.