[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102375: Fix background-color setting
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102375: Fix background-color setting in initial frame (Bug#7373). |
Date: |
Sat, 13 Nov 2010 13:34:02 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102375
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2010-11-13 13:34:02 -0500
message:
Fix background-color setting in initial frame (Bug#7373).
* lisp/frame.el (frame-notice-user-settings): Don't clobber other
user-set parameters when calling face-set-after-frame-default in
response to background-color parameter (Bug#7373).
modified:
lisp/ChangeLog
lisp/frame.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-11-13 13:35:44 +0000
+++ b/lisp/ChangeLog 2010-11-13 18:34:02 +0000
@@ -1,3 +1,9 @@
+2010-11-13 Chong Yidong <address@hidden>
+
+ * frame.el (frame-notice-user-settings): Don't clobber other
+ user-set parameters when calling face-set-after-frame-default in
+ response to background-color parameter (Bug#7373).
+
2010-11-13 Eli Zaretskii <address@hidden>
* international/characters.el (glyphless-char-display-control):
=== modified file 'lisp/frame.el'
--- a/lisp/frame.el 2010-10-24 18:43:31 +0000
+++ b/lisp/frame.el 2010-11-13 18:34:02 +0000
@@ -296,22 +296,19 @@
(null frame-initial-frame))
;; This case happens when we don't have a window system, and
;; also for MS-DOS frames.
- (let ((parms (frame-parameters frame-initial-frame)))
+ (let ((parms (frame-parameters)))
;; Don't change the frame names.
(setq parms (delq (assq 'name parms) parms))
;; Can't modify the minibuffer parameter, so don't try.
(setq parms (delq (assq 'minibuffer parms) parms))
- (modify-frame-parameters nil
- (if (null initial-window-system)
- (append initial-frame-alist
- window-system-frame-alist
- default-frame-alist
- parms
- nil)
- ;; initial-frame-alist and
- ;; default-frame-alist were already
- ;; applied in pc-win.el.
- parms))
+ (modify-frame-parameters
+ nil
+ (if initial-window-system
+ parms
+ ;; initial-frame-alist and default-frame-alist were already
+ ;; applied in pc-win.el.
+ (append initial-frame-alist window-system-frame-alist
+ default-frame-alist parms nil)))
(if (null initial-window-system) ;; MS-DOS does this differently in
pc-win.el
(let ((newparms (frame-parameters))
(frame (selected-frame)))
@@ -512,25 +509,28 @@
;; it is undesirable to specify the parm again
;; once the user has seen the frame and been able to alter it
;; manually.
- (while tail
- (let (newval oldval)
- (setq oldval (assq (car (car tail))
- frame-initial-frame-alist))
- (setq newval (cdr (assq (car (car tail)) allparms)))
+ (let (newval oldval)
+ (dolist (entry tail)
+ (setq oldval (assq (car entry) frame-initial-frame-alist))
+ (setq newval (cdr (assq (car entry) allparms)))
(or (and oldval (eq (cdr oldval) newval))
(setq newparms
- (cons (cons (car (car tail)) newval) newparms))))
- (setq tail (cdr tail)))
+ (cons (cons (car entry) newval) newparms)))))
(setq newparms (nreverse newparms))
- (modify-frame-parameters frame-initial-frame
- newparms)
- ;; If we changed the background color,
- ;; we need to update the background-mode parameter
- ;; and maybe some faces too.
- (when (assq 'background-color newparms)
- (unless (assq 'background-mode newparms)
- (frame-set-background-mode frame-initial-frame))
- (face-set-after-frame-default frame-initial-frame)))))
+
+ (let ((new-bg (assq 'background-color newparms)))
+ ;; If the `background-color' parameter is changed, apply
+ ;; it first, then make sure that the `background-mode'
+ ;; parameter and other faces are updated, before applying
+ ;; the other parameters.
+ (when new-bg
+ (modify-frame-parameters frame-initial-frame
+ (list new-bg))
+ (unless (assq 'background-mode newparms)
+ (frame-set-background-mode frame-initial-frame))
+ (face-set-after-frame-default frame-initial-frame)
+ (setq newparms (delq new-bg newparms)))
+ (modify-frame-parameters frame-initial-frame newparms)))))
;; Restore the original buffer.
(set-buffer old-buffer)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102375: Fix background-color setting in initial frame (Bug#7373).,
Chong Yidong <=