annotate leim/quail/thai.el @ 83522:a5d712e6585a

Fix crashes in `delete-terminal' caused by recursive calls or X displays with live frames. * src/termhooks.h (terminal) <deleted>: New member. * src/term.c (delete_tty): Use it. (deleting_tty): Remove old variable. * src/terminal.c (delete_terminal): Use terminal->deleted. * src/xterm.c (x_delete_terminal): Use terminal->deleted. Delete all frames on the display explicitly. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-562
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 20 May 2006 12:20:41 +0000
parents b94a4bf1aca6
children 6ee41fdd69ff 7beb78bc1f8e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38453
519983161a46 Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents: 31431
diff changeset
1 ;;; thai.el --- Quail package for inputting Thai characters
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
2
67657
b94a4bf1aca6 Copyright fixed
Kenichi Handa <handa@m17n.org>
parents: 64083
diff changeset
3 ;; Copyright (C) 1995, 1997, 1999, 2005
60704
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
4 ;; National Institute of Advanced Industrial Science and Technology (AIST)
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
5 ;; Registration Number H14PRO021
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
6
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
7 ;; Keywords: multilingual, input method, Thai
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
8
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
10
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
14 ;; any later version.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
15
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
20
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64083
23a17af379b1 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 60704
diff changeset
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23a17af379b1 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 60704
diff changeset
24 ;; Boston, MA 02110-1301, USA.
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
25
38453
519983161a46 Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents: 31431
diff changeset
26 ;;; Commentary:
519983161a46 Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents: 31431
diff changeset
27
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
28 ;;; Code:
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
29
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
30 (require 'quail)
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
31 (require 'thai-util)
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
32
60704
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
33 (defmacro thai-generate-quail-map (translation-table)
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
34 (let (map)
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
35 (dotimes (i (length translation-table))
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
36 (let ((trans (aref translation-table i)))
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
37 (when (not (eq trans 0))
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
38 (if (> (length trans) 1)
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
39 (setq trans (vector trans))
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
40 (setq trans (aref trans 0)))
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
41 (setq map (cons (list (char-to-string i) trans) map)))))
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
42 `(quail-define-rules ,@map)))
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
43
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
44 ;; Thai Kesmanee keyboard support.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
45
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
46 (quail-define-package
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
47 "thai-kesmanee" "Thai" ",T!!(B>" t
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
48 "Thai Kesmanee input method with TIS620 keyboard layout
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
49
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
50 The difference from the ordinal Thai keyboard:
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
51 ',T_(B' and ',To(B' are assigned to '\\' and '|' respectively,
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
52 ',T#(B' and ',T%(B' are assigned to '`' and '~' respectively,
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
53 Don't know where to assign characters ',Tz(B' and ',T{(B'."
60704
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
54 nil t t t t nil nil nil nil nil t)
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
55
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47241
diff changeset
56 (quail-install-map
26881
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
57 (thai-generate-quail-map
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
58 [
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
59 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
60 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
60605
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
61 ;; This data is quite old.
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
62 ;; 0 "#" "." ",Tr(B" ",Ts(B" ",Tt(B" ",TQi(B" ",T'(B" ; SPC .. '
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
63 ;; ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. /
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
64 ;; ",T((B" ",TE(B" "/" "_" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
65 ;; ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ?
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
66 ;; ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
67 ;; ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" ",Tn(B" ",Tl(B" ",TO(B" ; H .. O
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
68 ;; ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
69 ;; ")" ",Tm(B" "(" ",T:(B" ",T_(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
70 ;; ",T#(B" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
71 ;; ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
72 ;; ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
73 ;; ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",To(B" "," ",T%(B" 0 ; x .. DEL
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
74 ;; This is the correct data nowadays.
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
75 0 "+" "." ",Tr(B" ",Ts(B" ",Tt(B" ",T_(B" ",T'(B" ; SPC .. '
26881
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
76 ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. /
60605
600e9d5b46cc (thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents: 52401
diff changeset
77 ",T((B" ",Te(B" "/" "-" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7
26881
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
78 ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ?
60606
e7d3f2a9b84f Fix previous change.
Kenichi Handa <handa@m17n.org>
parents: 60605
diff changeset
79 ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G
e7d3f2a9b84f Fix previous change.
Kenichi Handa <handa@m17n.org>
parents: 60605
diff changeset
80 ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" "?" ",Tl(B" ",TO(B" ; H .. O
26881
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
81 ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W
60606
e7d3f2a9b84f Fix previous change.
Kenichi Handa <handa@m17n.org>
parents: 60605
diff changeset
82 "\)" ",Tm(B" "\(" ",T:(B" ",T#(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _
e7d3f2a9b84f Fix previous change.
Kenichi Handa <handa@m17n.org>
parents: 60605
diff changeset
83 "_" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g
e7d3f2a9b84f Fix previous change.
Kenichi Handa <handa@m17n.org>
parents: 60605
diff changeset
84 ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o
26881
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
85 ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w
60606
e7d3f2a9b84f Fix previous change.
Kenichi Handa <handa@m17n.org>
parents: 60605
diff changeset
86 ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",T%(B" "," "%" 0 ; x .. DEL
26881
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
87 ]))
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
88
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
89
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
90
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
91 ;; Thai Pattachote keyboard support.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
92
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
93 (quail-define-package
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
94 "thai-pattachote" "Thai" ",T!;(B>" t
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
95 "Thai Pattachote input method with TIS620 keyboard layout"
60704
7c239dedaeea (quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents: 60606
diff changeset
96 nil t t t t nil nil nil nil nil t)
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
97
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47241
diff changeset
98 (quail-install-map
26881
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
99 (thai-generate-quail-map
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
100 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
102 0 "+" ",T1(B" "/" "," "?" "_" ",T"(B" ; SPC .. '
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
103 "(" ")" "." "%" ",TP(B" ",Tq(B" ",T((B" ",T>(B" ; ( .. /
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
104 ",Tp(B" "=" ",Tr(B" ",Ts(B" ",Tt(B" ",Tu(B" ",TY(B" ",Tw(B" ; 0 .. 7
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
105 ",Tx(B" ",Ty(B" ",T&(B" ",Td(B" ",T?(B" ",Tv(B" ",T2(B" ",TL(B" ; 8 .. ?
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
106 "\"" ",Tk(B" ",TQ(B" ",T0(B" ",TS(B" ",Tf(B" ",T3(B" ",Tl(B" ; @ .. G
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
107 ",TW(B" ",T+(B" ",T<(B" ",T*(B" ",Tb(B" ",TN(B" ",TH(B" ",T6(B" ; H .. O
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
108 ",T2(B" ",Tj(B" ",T-(B" ",T8(B" ",TI(B" ",T=(B" ",T@(B" ",TD(B" ; P .. W
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
109 ",T.(B" ",TV(B" ",T.(B" ",Tc(B" ",TZ(B" ",T2(B" ",TX(B" "-" ; X .. _
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
110 ",T#(B" ",Ti(B" ",TT(B" ",TE(B" ",T'(B" ",TB(B" ",T!(B" ",TQ(B" ; ` .. g
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
111 ",TU(B" ",TA(B" ",TR(B" ",T9(B" ",T`(B" ",TJ(B" ",T$(B" ",TG(B" ; h .. o
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
112 ",Ta(B" ",Tg(B" ",TM(B" ",T7(B" ",TC(B" ",T4(B" ",TK(B" ",T5(B" ; p .. w
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
113 ",T;(B" ",Th(B" ",T:(B" ",TO(B" ",Tm(B" ",TF(B" ",T%(B" 0 ; x .. DEL
cd1cb9bf30e1 Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents: 19722
diff changeset
114 ]))
38453
519983161a46 Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents: 31431
diff changeset
115
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
116 ;;; arch-tag: fed6c468-0616-44b0-88bf-47347bf64825
38453
519983161a46 Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents: 31431
diff changeset
117 ;;; thai.el ends here