frame parameters after calling tty-handle-reverse-video. Call
face-set-after-frame-default with the actual parameters, to avoid
resetting colors back to unspecified.
- (set-background-color, set-foreground-color): Pass the selected
- color to face-set-after-frame-default. (Bug#19802)
+ (set-background-color, set-foreground-color): Pass the foreground
+ and background colors to face-set-after-frame-default. (Bug#19802)
2015-02-06 Wolfgang Jenkner <wjenkner@inode.at>
(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.
(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.