diff options
| author | Karoly Lorentey | 2005-04-11 12:40:15 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-04-11 12:40:15 +0000 |
| commit | 221d5c8772dc29f854292ec7cb423fce925daecf (patch) | |
| tree | 5fe05145ce31ffcc9d1a621c027410151e4a2106 /lisp/term | |
| parent | 1b9ab2508610fea57aa777956de14ee84d66862f (diff) | |
| parent | 9552bee8c6e7c5ee16ca60cddebaebdf5d238e05 (diff) | |
| download | emacs-221d5c8772dc29f854292ec7cb423fce925daecf.tar.gz emacs-221d5c8772dc29f854292ec7cb423fce925daecf.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 59, 240-245)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-240
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-241
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-242
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-244
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-245
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-59
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-326
Diffstat (limited to 'lisp/term')
| -rw-r--r-- | lisp/term/xterm.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 5b26ea636ac..d9de658c158 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -125,7 +125,7 @@ | |||
| 125 | 125 | ||
| 126 | (defun xterm-rgb-convert-to-16bit (prim) | 126 | (defun xterm-rgb-convert-to-16bit (prim) |
| 127 | "Convert an 8-bit primary color value PRIM to a corresponding 16-bit value." | 127 | "Convert an 8-bit primary color value PRIM to a corresponding 16-bit value." |
| 128 | (min 65535 (round (* (/ prim 255.0) 65535.0)))) | 128 | (logior prim (lsh prim 8))) |
| 129 | 129 | ||
| 130 | (defun xterm-register-default-colors () | 130 | (defun xterm-register-default-colors () |
| 131 | "Register the default set of colors for xterm or compatible emulator. | 131 | "Register the default set of colors for xterm or compatible emulator. |
| @@ -162,9 +162,10 @@ versions of xterm." | |||
| 162 | (tty-color-define (format "color-%d" (- 256 ncolors)) | 162 | (tty-color-define (format "color-%d" (- 256 ncolors)) |
| 163 | (- 256 ncolors) | 163 | (- 256 ncolors) |
| 164 | (mapcar 'xterm-rgb-convert-to-16bit | 164 | (mapcar 'xterm-rgb-convert-to-16bit |
| 165 | (list (round (* r 42.5)) | 165 | (list (if (zerop r) 0 (+ (* r 40) 55)) |
| 166 | (round (* g 42.5)) | 166 | (if (zerop g) 0 (+ (* g 40) 55)) |
| 167 | (round (* b 42.5))))) | 167 | (if (zerop b) 0 (+ (* b 40) 55))))) |
| 168 | |||
| 168 | (setq b (1+ b)) | 169 | (setq b (1+ b)) |
| 169 | (if (> b 5) | 170 | (if (> b 5) |
| 170 | (setq g (1+ g) | 171 | (setq g (1+ g) |
| @@ -202,7 +203,7 @@ versions of xterm." | |||
| 202 | ;; Now the 8 gray colors | 203 | ;; Now the 8 gray colors |
| 203 | (while (> ncolors 0) | 204 | (while (> ncolors 0) |
| 204 | (setq color (xterm-rgb-convert-to-16bit | 205 | (setq color (xterm-rgb-convert-to-16bit |
| 205 | (round | 206 | (floor |
| 206 | (if (= ncolors 8) | 207 | (if (= ncolors 8) |
| 207 | 46.36363636 | 208 | 46.36363636 |
| 208 | (+ (* (- 8 ncolors) 23.18181818) 69.54545454))))) | 209 | (+ (* (- 8 ncolors) 23.18181818) 69.54545454))))) |