annotate lisp/term/w32console.el @ 108079:216b6ef76da7

Support `display' text properties and overlays. xdisp.c (pop_it): When the stack is popped after displaying from a string, bidi-iterate to exit from the text portion covered by the `display' property or overlay. (Bug#5988, bug#5920)
author Eli Zaretskii <eliz@gnu.org>
date Fri, 23 Apr 2010 18:05:23 +0300
parents 1d1d5d9bd884
children d1cffc3c49f5 376148b31b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
86266
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
1 ;;; w32console.el -- Setup w32 console keys and colors.
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
2
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 100908
diff changeset
3 ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
86266
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
4
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
5 ;; Author: FSF
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
6 ;; Keywords: terminals
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
7
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
9
94671
f3ab0c2464f5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
86266
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
94671
f3ab0c2464f5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
12 ;; the Free Software Foundation, either version 3 of the License, or
f3ab0c2464f5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
13 ;; (at your option) any later version.
86266
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
14
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
19
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
94671
f3ab0c2464f5 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 87665
diff changeset
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
86266
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
22
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
23 ;;; Commentary:
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
24
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
25 ;;; Code:
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
26
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
27 ;; W32 uses different color indexes than standard:
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
28
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
29 (defvar w32-tty-standard-colors
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
30 '(("black" 0 0 0 0)
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
31 ("blue" 1 0 0 52480) ; MediumBlue
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
32 ("green" 2 8704 35584 8704) ; ForestGreen
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
33 ("cyan" 3 0 52736 53504) ; DarkTurquoise
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
34 ("red" 4 45568 8704 8704) ; FireBrick
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
35 ("magenta" 5 35584 0 35584) ; DarkMagenta
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
36 ("brown" 6 40960 20992 11520) ; Sienna
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
37 ("lightgray" 7 48640 48640 48640) ; Gray
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
38 ("darkgray" 8 26112 26112 26112) ; Gray40
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
39 ("lightblue" 9 0 0 65535) ; Blue
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
40 ("lightgreen" 10 0 65535 0) ; Green
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
41 ("lightcyan" 11 0 65535 65535) ; Cyan
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
42 ("lightred" 12 65535 0 0) ; Red
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
43 ("lightmagenta" 13 65535 0 65535) ; Magenta
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
44 ("yellow" 14 65535 65535 0) ; Yellow
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
45 ("white" 15 65535 65535 65535))
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
46 "A list of VGA console colors, their indices and 16-bit RGB values.")
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
47
95841
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 94671
diff changeset
48 (declare-function x-setup-function-keys "w32-fns" (frame))
b4e36ff621b3 Add some compiler declarations, for builds without X.
Glenn Morris <rgm@gnu.org>
parents: 94671
diff changeset
49
86266
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
50 (defun terminal-init-w32console ()
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
51 "Terminal initialization function for w32 console."
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
52 ;; Share function key initialization with w32 gui frames
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
53 (x-setup-function-keys (selected-frame))
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
54 (let* ((colors w32-tty-standard-colors)
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
55 (color (car colors)))
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
56 (tty-color-clear)
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
57 (while colors
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
58 (tty-color-define (car color) (cadr color) (cddr color))
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
59 (setq colors (cdr colors)
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
60 color (car colors))))
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
61 (clear-face-cache)
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
62 (tty-set-up-initial-frame-faces)
20c1649756b5 New term init file for w32 console.
Jason Rumney <jasonr@gnu.org>
parents:
diff changeset
63 (run-hooks 'terminal-init-w32-hook))
86274
860b7eb2a46f Add arch tagline
Miles Bader <miles@gnu.org>
parents: 86266
diff changeset
64
860b7eb2a46f Add arch tagline
Miles Bader <miles@gnu.org>
parents: 86266
diff changeset
65 ;; arch-tag: 3195fd5e-ab86-4a46-b1dc-4f7a8c8deff3