diff options
author | Eli Zaretskii <eliz@gnu.org> | 2015-02-08 20:09:19 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2015-02-08 20:09:19 +0200 |
commit | a7b1c2f88f06bbeda16117c0aa1caffac1b4ebe1 (patch) | |
tree | cb8bff6f88201dbd1c0e54735039eb6fbced0225 /lisp/frame.el | |
parent | 20c817d3657ec67792edafd75f34d829144e8590 (diff) | |
download | emacs-a7b1c2f88f06bbeda16117c0aa1caffac1b4ebe1.tar.gz |
Don't lose frame's background color when setting foreground (Bug#19802)
lisp/frame.el ((set-background-color, set-foreground-color): Pass the
other color, if defined, to face-set-after-frame-default.
Diffstat (limited to 'lisp/frame.el')
-rw-r--r-- | lisp/frame.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index eea5c24a82d..1a584fa0e2c 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1191,7 +1191,13 @@ To get the frame's current background color, use `frame-parameters'." (or window-system (face-set-after-frame-default (selected-frame) (list - (cons 'background-color color-name))))) + (cons 'background-color color-name) + ;; Pass the foreground-color as + ;; well, if defined, to avoid + ;; losing it when faces are reset + ;; to their defaults. + (assq 'foreground-color + (frame-parameters)))))) (defun set-foreground-color (color-name) "Set the foreground color of the selected frame to COLOR-NAME. @@ -1203,7 +1209,13 @@ To get the frame's current foreground color, use `frame-parameters'." (or window-system (face-set-after-frame-default (selected-frame) (list - (cons 'foreground-color color-name))))) + (cons 'foreground-color color-name) + ;; Pass the background-color as + ;; well, if defined, to avoid + ;; losing it when faces are reset + ;; to their defaults. + (assq 'background-color + (frame-parameters)))))) (defun set-cursor-color (color-name) "Set the text cursor color of the selected frame to COLOR-NAME. |