annotate lisp/term/xterm.el @ 5588:2dbefd79b3d3

Prevent SIGPIPEs in deactivate_process(). * process.c (deactivate_process): Use Lstream_close_noflush on output pipe instead of Lstream_close. * lstream.c (Lstream_close_noflush): New. Factored out of Lstream_close. (Lstream_close): Use Lstream_close_noflush. * lstream.h (Lstream_close_noflush): Declare it.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 29 Oct 2011 01:10:32 +0900
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; xterm.el --- define function key sequences for xterm
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Author: FSF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ;; Keywords: terminals
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 ;; Copyright (C) 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
10 ;; XEmacs is free software: you can redistribute it and/or modify it
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
11 ;; under the terms of the GNU General Public License as published by the
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
12 ;; Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
13 ;; option) any later version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
16 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
17 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
18 ;; for more details.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
21 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;; Termcap or terminfo should set these next four?
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 (define-key function-key-map "\e[A" [up])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 (define-key function-key-map "\e[B" [down])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 (define-key function-key-map "\e[C" [right])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 (define-key function-key-map "\e[D" [left])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 (define-key function-key-map "\eO\000" [home])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 (define-key function-key-map "\eOe" [end])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 (define-key function-key-map "\e[1~" [find])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 (define-key function-key-map "\e[2~" [insert])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 (define-key function-key-map "\e[3~" [delete])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 (define-key function-key-map "\e[4~" [select])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 (define-key function-key-map "\e[5~" [prior])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 (define-key function-key-map "\e[6~" [next])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 (define-key function-key-map "\e[11~" [f1])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 (define-key function-key-map "\e[12~" [f2])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 (define-key function-key-map "\e[13~" [f3])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 (define-key function-key-map "\e[14~" [f4])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 (define-key function-key-map "\e[15~" [f5])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 (define-key function-key-map "\e[17~" [f6])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 (define-key function-key-map "\e[18~" [f7])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 (define-key function-key-map "\e[19~" [f8])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 (define-key function-key-map "\e[20~" [f9])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 (define-key function-key-map "\e[21~" [f10])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 (define-key function-key-map "\e[23~" [f11])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 (define-key function-key-map "\e[24~" [f12])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 (define-key function-key-map "\e[25~" [f13])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 (define-key function-key-map "\e[26~" [f14])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 (define-key function-key-map "\e[28~" [help])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 (define-key function-key-map "\e[29~" [menu])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 ; FSF's xterm.el defines this like this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 ; (I don't know which one is more correct)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 ;(define-key function-key-map "\e[29~" [print])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 (define-key function-key-map "\e[31~" [f17])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 (define-key function-key-map "\e[32~" [f18])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 (define-key function-key-map "\e[33~" [f19])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 (define-key function-key-map "\e[34~" [f20])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 ;; Termcap or terminfo should set these next four.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 (define-key function-key-map "\eOA" [up])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 (define-key function-key-map "\eOB" [down])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 (define-key function-key-map "\eOC" [right])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 (define-key function-key-map "\eOD" [left])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 (define-key function-key-map "\eOp" [kp-0])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 (define-key function-key-map "\eOq" [kp-1])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 (define-key function-key-map "\eOr" [kp-2])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 (define-key function-key-map "\eOs" [kp-3])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 (define-key function-key-map "\eOt" [kp-4])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 (define-key function-key-map "\eOu" [kp-5])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 (define-key function-key-map "\eOv" [kp-6])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 (define-key function-key-map "\eOw" [kp-7])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 (define-key function-key-map "\eOx" [kp-8])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 (define-key function-key-map "\eOy" [kp-9])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 (define-key function-key-map "\eOk" [kp-add])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 (define-key function-key-map "\eOm" [kp-subtract])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 (define-key function-key-map "\eOM" [kp-enter])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 (define-key function-key-map "\eOj" [kp-multiply])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 (define-key function-key-map "\eOo" [kp-divide])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 (define-key function-key-map "\eOn" [kp-decimal])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 ;; If you use the X resource -- XTerm*sunFunctionKeys: on -- you may
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 ;; need these.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 (define-key function-key-map "\e[224z" [f1])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 (define-key function-key-map "\e[225z" [f2])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 (define-key function-key-map "\e[226z" [f3])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 (define-key function-key-map "\e[227z" [f4])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 (define-key function-key-map "\e[228z" [f5])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 (define-key function-key-map "\e[229z" [f6])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 (define-key function-key-map "\e[230z" [f7])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 (define-key function-key-map "\e[231z" [f8])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 (define-key function-key-map "\e[232z" [f9])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 (define-key function-key-map "\e[233z" [f10])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 (define-key function-key-map "\e[234z" [f11])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 (define-key function-key-map "\e[235z" [f12])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 (define-key function-key-map "\e[194z" [(shift f1)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 (define-key function-key-map "\e[195z" [(shift f2)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 (define-key function-key-map "\e[196z" [(shift f3)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 (define-key function-key-map "\e[197z" [(shift f4)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 (define-key function-key-map "\e[198z" [(shift f5)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 (define-key function-key-map "\e[199z" [(shift f6)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 (define-key function-key-map "\e[200z" [(shift f7)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 (define-key function-key-map "\e[201z" [(shift f8)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 (define-key function-key-map "\e[208z" [(shift f9)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 (define-key function-key-map "\e[209z" [(shift f10)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 (define-key function-key-map "\e[210z" [(shift f11)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 (define-key function-key-map "\e[211z" [(shift f12)])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 (define-key function-key-map "\e[2z" [insert])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 (define-key function-key-map "\e[5z" [prior])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 (define-key function-key-map "\e[6z" [next])
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 ;;; xterm.el ends here