Mercurial > emacs
comparison lisp/term/rxvt.el @ 90199:bb71c6cf2009
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-67
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 447-458)
- Update from CVS
- Update from CVS: lisp/subr.el (add-to-ordered-list): Doc fix.
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 83-85)
- Merge from emacs--cvs-trunk--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 30 Jun 2005 00:31:46 +0000 |
parents | 68c22ea6027c 63a4d25b8e9e |
children | f9a65d7ebd29 |
comparison
equal
deleted
inserted
replaced
90198:97f6c3a96df1 | 90199:bb71c6cf2009 |
---|---|
148 ;; intelligent way than the default guesswork in startup.el. | 148 ;; intelligent way than the default guesswork in startup.el. |
149 (defun rxvt-set-background-mode () | 149 (defun rxvt-set-background-mode () |
150 "Set background mode as appropriate for the default rxvt colors." | 150 "Set background mode as appropriate for the default rxvt colors." |
151 (let ((fgbg (getenv "COLORFGBG")) | 151 (let ((fgbg (getenv "COLORFGBG")) |
152 bg rgb) | 152 bg rgb) |
153 (setq frame-background-mode 'light) ; default | 153 (setq default-frame-background-mode 'light) |
154 (when (and fgbg | 154 (when (and fgbg |
155 (string-match ".*;\\([0-9][0-9]?\\)\\'" fgbg)) | 155 (string-match ".*;\\([0-9][0-9]?\\)\\'" fgbg)) |
156 (setq bg (string-to-number (substring fgbg (match-beginning 1)))) | 156 (setq bg (string-to-number (substring fgbg (match-beginning 1)))) |
157 ;; The next line assumes that rxvt-standard-colors are ordered | 157 ;; The next line assumes that rxvt-standard-colors are ordered |
158 ;; by the color index in the ascending order! | 158 ;; by the color index in the ascending order! |
161 ;; computation below. | 161 ;; computation below. |
162 (if (< (apply '+ rgb) | 162 (if (< (apply '+ rgb) |
163 ;; The following line assumes that white is the 15th | 163 ;; The following line assumes that white is the 15th |
164 ;; color in rxvt-standard-colors. | 164 ;; color in rxvt-standard-colors. |
165 (* (apply '+ (car (cddr (nth 15 rxvt-standard-colors)))) 0.6)) | 165 (* (apply '+ (car (cddr (nth 15 rxvt-standard-colors)))) 0.6)) |
166 (setq frame-background-mode 'dark))) | 166 (setq default-frame-background-mode 'dark))) |
167 (frame-set-background-mode (selected-frame)))) | 167 (frame-set-background-mode (selected-frame)))) |
168 | 168 |
169 ;; Do it! | 169 ;; Do it! |
170 (rxvt-register-default-colors) | 170 (rxvt-register-default-colors) |
171 (rxvt-set-background-mode) | 171 (rxvt-set-background-mode) |