mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-07 20:59:37 +00:00
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.
This commit is contained in:
parent
20c817d365
commit
a7b1c2f88f
2 changed files with 16 additions and 4 deletions
|
@ -4,8 +4,8 @@
|
||||||
frame parameters after calling tty-handle-reverse-video. Call
|
frame parameters after calling tty-handle-reverse-video. Call
|
||||||
face-set-after-frame-default with the actual parameters, to avoid
|
face-set-after-frame-default with the actual parameters, to avoid
|
||||||
resetting colors back to unspecified.
|
resetting colors back to unspecified.
|
||||||
(set-background-color, set-foreground-color): Pass the selected
|
(set-background-color, set-foreground-color): Pass the foreground
|
||||||
color to face-set-after-frame-default. (Bug#19802)
|
and background colors to face-set-after-frame-default. (Bug#19802)
|
||||||
|
|
||||||
2015-02-06 Wolfgang Jenkner <wjenkner@inode.at>
|
2015-02-06 Wolfgang Jenkner <wjenkner@inode.at>
|
||||||
|
|
||||||
|
|
|
@ -1191,7 +1191,13 @@ To get the frame's current background color, use `frame-parameters'."
|
||||||
(or window-system
|
(or window-system
|
||||||
(face-set-after-frame-default (selected-frame)
|
(face-set-after-frame-default (selected-frame)
|
||||||
(list
|
(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)
|
(defun set-foreground-color (color-name)
|
||||||
"Set the foreground color of the selected frame to 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
|
(or window-system
|
||||||
(face-set-after-frame-default (selected-frame)
|
(face-set-after-frame-default (selected-frame)
|
||||||
(list
|
(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)
|
(defun set-cursor-color (color-name)
|
||||||
"Set the text cursor color of the selected frame to COLOR-NAME.
|
"Set the text cursor color of the selected frame to COLOR-NAME.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue