Mercurial > emacs
comparison lisp/term/pc-win.el @ 32547:946f66d4b38b
(msdos-handle-reverse-video): Don't remove
reverse from the frame parameters, and don't invert foreground and
background colors.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Mon, 16 Oct 2000 19:17:35 +0000 |
parents | a0674327c167 |
children | b7b3acac61b8 |
comparison
equal
deleted
inserted
replaced
32546:9672c4db6bed | 32547:946f66d4b38b |
---|---|
84 | 84 |
85 (defun msdos-handle-reverse-video (frame parameters) | 85 (defun msdos-handle-reverse-video (frame parameters) |
86 "Handle the reverse-video frame parameter on MS-DOS frames." | 86 "Handle the reverse-video frame parameter on MS-DOS frames." |
87 (when (cdr (assq 'reverse parameters)) | 87 (when (cdr (assq 'reverse parameters)) |
88 (let* ((params (frame-parameters frame)) | 88 (let* ((params (frame-parameters frame)) |
89 (bg (cdr (assq 'foreground-color params))) | 89 (fg (cdr (assq 'foreground-color params))) |
90 (fg (cdr (assq 'background-color params)))) | 90 (bg (cdr (assq 'background-color params)))) |
91 (modify-frame-parameters frame '((reverse . nil))) | 91 (if (equal fg (cdr (assq 'mouse-color params))) |
92 (if (equal bg (cdr (assq 'mouse-color params))) | |
93 (modify-frame-parameters frame | 92 (modify-frame-parameters frame |
94 (list (cons 'mouse-color fg)))) | 93 (list (cons 'mouse-color bg)))) |
95 (if (equal bg (cdr (assq 'cursor-color params))) | 94 (if (equal fg (cdr (assq 'cursor-color params))) |
96 (modify-frame-parameters frame | 95 (modify-frame-parameters frame |
97 (list (cons 'cursor-color fg))))))) | 96 (list (cons 'cursor-color bg))))))) |
98 | 97 |
99 ;; This must run after all the default colors are inserted into | 98 ;; This must run after all the default colors are inserted into |
100 ;; tty-color-alist, since msdos-handle-reverse-video needs to know the | 99 ;; tty-color-alist, since msdos-handle-reverse-video needs to know the |
101 ;; actual frame colors. tty-color-alist is set up by startup.el, but | 100 ;; actual frame colors. tty-color-alist is set up by startup.el, but |
102 ;; only after it runs before-init-hook and after-init-hook. | 101 ;; only after it runs before-init-hook and after-init-hook. |