From: Chong Yidong <cyd@gnu.org>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: Brendan Miller <catphive@catphive.net>, 9982@debbugs.gnu.org
Subject: bug#9982: Theme faces wrongly applied after background changes.
Date: Sun, 29 Jan 2012 22:14:57 +0800 [thread overview]
Message-ID: <8762fuegta.fsf@gnu.org> (raw)
In-Reply-To: <87zkd6bpun.fsf@gnu.org> (Chong Yidong's message of "Sun, 29 Jan 2012 21:28:00 +0800")
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.
next prev parent reply other threads:[~2012-01-29 14:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 2:33 bug#9982: M-x load-theme does not change background color Brendan Miller
2011-11-07 17:46 ` Glenn Morris
2011-11-07 19:55 ` Brendan Miller
2011-11-07 20:29 ` Glenn Morris
2011-11-08 2:01 ` Stefan Monnier
2011-11-08 5:51 ` Brendan Miller
2011-11-08 6:36 ` Eli Zaretskii
2011-11-08 7:38 ` Brendan Miller
2011-11-08 8:24 ` Eli Zaretskii
2011-11-08 8:34 ` Brendan Miller
2011-11-08 8:44 ` Eli Zaretskii
2011-11-21 19:05 ` Jan Djärv
2011-12-11 13:17 ` Jan Djärv
2011-12-26 15:19 ` bug#9982: Theme faces wrongly applied after background changes Jan Djärv
2012-01-29 11:08 ` Chong Yidong
2012-01-29 13:28 ` Chong Yidong
2012-01-29 14:14 ` Chong Yidong [this message]
2012-01-29 15:22 ` Jan Djärv
2012-01-29 15:02 ` Jan Djärv
2012-01-31 8:41 ` Chong Yidong
2011-11-09 8:18 ` bug#9982: M-x load-theme does not change background color Jan Djärv
[not found] ` <mailman.2069.1320695773.15868.bug-gnu-emacs@gnu.org>
2011-11-07 20:09 ` Daimrod
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8762fuegta.fsf@gnu.org \
--to=cyd@gnu.org \
--cc=9982@debbugs.gnu.org \
--cc=catphive@catphive.net \
--cc=jan.h.d@swipnet.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.