annotate lisp/language/arabic-util.el @ 195:a2f645c6b9f8 r20-3b24

Import from CVS: tag r20-3b24
author cvs
date Mon, 13 Aug 2007 09:59:05 +0200
parents 85ec50267440
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
1 ;;; arabic-util.el --- minor mode for editing Arabic.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
2
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
3 ;; Copyright (C) 1994 Free Software Foundation, Inc.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
4
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
5 ;; Keywords: multilingual, Arabic
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
6
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
7 ;; This file is part of XEmacs.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
8
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
9 ;; XEmacs is free software; you can redistribute it and/or modify it
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
10 ;; under the terms of the GNU General Public License as published by
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
11 ;; the Free Software Foundation; either version 2, or (at your option)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
12 ;; any later version.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
13
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
14 ;; XEmacs is distributed in the hope that it will be useful, but
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
15 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
17 ;; General Public License for more details.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
18
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
20 ;; along with XEmacs; see the file COPYING. If not, write to the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
22 ;; Boston, MA 02111-1307, USA.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
23
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
24 ;;; Commentary:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
25
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
26 ;; Synched up with: Mule 2.3.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
27
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
28 ;;; Code:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
29
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
30 ;;; 94.6.13 created for Mule Ver.1.1 by Takahashi N. <ntakahas@etl.go.jp>
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
31
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
32 (require 'visual-mode)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
33
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
34 (defvar arabic-mode-indicator " ›2](3=a:GJ›0](B"
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
35 "String displayed in mode-line.
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
36 \" Arabic\" for Arabic keyboard input, \" ›2](3=a:GJ›0](B\".")
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
37
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
38 (make-variable-buffer-local 'arabic-mode-indicator)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
39
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
40 ;;;###autoload
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
41 (defvar arabic-mode nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
42 "Non-nil if in arabic-mode.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
43
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
44 (make-variable-buffer-local 'arabic-mode)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
45
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
46 (if (not (assq 'arabic-mode minor-mode-alist))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
47 (setq minor-mode-alist
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
48 (cons '(arabic-mode arabic-mode-indicator) minor-mode-alist)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
49
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
50 (define-key global-map [(meta \\)] 'arabic-mode)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
51
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
52 (defvar arabic-input-arabic-char t
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
53 "Non-nil if key input is Arabic. Nil if key input is ASCII.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
54
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
55 (make-variable-buffer-local 'arabic-input-arabic-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
56
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
57 (defvar arabic-input-keymap 'arabic-keymap-0
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
58 "Specify which input table is used for Arabic input. Should be on of:
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
59 arabic-keymap-0 (default),
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
60 arabic-keymap-1 (Farsi standard), or
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
61 arabic-keymap-2 (Microsoft Arabic).")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
62
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
63 (defvar arabic-translate-table
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
64 (cond
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
65 ((eq arabic-input-keymap 'arabic-keymap-0)
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
66 [?›2](3!›0](B ?›2](3"›0](B ?›2](3-›0](B nil nil nil nil ?' ?›2](3#›0](B ?›2](3$›0](B nil nil ?›2](3%›0](B nil ?›2](3&›0](B ?›2](49›0](B
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
67 ?(2!(B ?(2"(B ?(2#(B ?(2$(B ?(2%(B ?(2&(B ?(2'(B ?(2((B ?(2)(B ?(2*(B ?›2](3'›0](B ?›2](3(›0](B ?›2](3*›0](B nil ?›2](3+›0](B ?›2](3)›0](B
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
68 nil ?›2](4]›0](B nil ?›2](4g›0](B ?›2](4A›0](B nil nil ?›2](4O›0](B ?›2](4-›0](B nil nil ?›2](41›0](B nil nil nil nil
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
69 nil nil nil ?›2](4=›0](B ?›2](4E›0](B nil nil nil ?›2](3h›0](B nil ?›2](4I›0](B nil nil nil nil nil
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
70 ?›2](4M›0](B ?›2](38›0](B ?›2](4#›0](B ?›2](4'›0](B ?›2](3B›0](B nil ?›2](4Q›0](B ?›2](4k›0](B ?›2](3Z›0](B nil ?›2](4)›0](B ?›2](4U›0](B ?›2](4Y›0](B ?›2](3T›0](B ?›2](4[›0](B ?›2](3<›0](B
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
71 ?›2](4e›0](B ?›2](4S›0](B ?›2](3F›0](B ?›2](45›0](B ?›2](4%›0](B nil nil ?›2](3^›0](B ?›2](3D›0](B ?›2](4_›0](B ?›2](3H›0](B nil ?| nil nil])
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
72 ((eq arabic-input-keymap 'arabic-keymap-1)
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
73 [?›2](3!›0](B ?›2](3"›0](B nil nil nil nil nil nil ?›2](3#›0](B ?›2](3$›0](B nil nil ?›2](3%›0](B nil ?›2](3&›0](B nil
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
74 ?(2!(B ?(2"(B ?(2#(B ?(2$(B ?(2%(B ?(2&(B ?(2'(B ?(2((B ?(2)(B ?(2*(B ?›2](3'›0](B ?›2](4U›0](B ?›2](3*›0](B nil ?›2](3+›0](B ?›2](3)›0](B
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
75 nil nil ?›2](3h›0](B nil nil nil ?›2](4e›0](B ?›2](3.›0](B nil nil nil nil nil nil nil nil
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
76 nil nil nil nil nil nil ?›2](30›0](B nil nil nil nil ?›2](4)›0](B nil ?›2](4g›0](B nil nil
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
77 nli ?›2](49›0](B ?›2](3H›0](B ?›2](3D›0](B ?›2](4_›0](B ?›2](4S›0](B ?›2](4#›0](B ?›2](38›0](B ?›2](4%›0](B nil ?›2](4Y›0](B ?›2](4[›0](B ?›2](3T›0](B ?›2](3^›0](B ?›2](3F›0](B ?›2](41›0](B
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
78 ?›2](4-›0](B ?›2](4A›0](B ?›2](4Q›0](B ?›2](45›0](B ?›2](4O›0](B ?›2](3Z›0](B ?›2](3B›0](B ?›2](4=›0](B ?›2](4E›0](B ?›2](4M›0](B ?›2](4I›0](B nil nli nil nil ])
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
79 (t
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
80 [?›2](3!›0](B ?›2](3"›0](B ?\" ?# ?$ ?% ?& ?' ?›2](3#›0](B ?›2](3$›0](B ?* ?+ ?›2](3^›0](B ?- ?›2](3H›0](B ?›2](4I›0](B
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
81 ?(2!(B ?(2"(B ?(2#(B ?(2$(B ?(2%(B ?(2&(B ?(2'(B ?(2((B ?(2)(B ?(2*(B ?›2](3'›0](B ?›2](4U›0](B ?, ?= ?. ?›2](3)›0](B
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
82 ?@ nil ?›2](3b›0](B ?{ ?[ nil ?] ?›2](3c›0](B ?›2](30›0](B nil nil ?›2](3%›0](B ?/ ?` ?›2](3.›0](B nil
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
83 ?›2](3(›0](B nil nil nil ?›2](3d›0](B ?' ?} nil nil ?›2](34›0](B ?~ ?›2](4)›0](B ?\\ ?›2](3B›0](B ?^ ?_
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
84 ?›2](3D›0](B ?›2](49›0](B ?›2](3e›0](B ?›2](32›0](B ?›2](4_›0](B ?›2](4'›0](B ?›2](4#›0](B ?›2](4Y›0](B ?›2](38›0](B ?›2](3Z›0](B ?›2](4%›0](B ?›2](4[›0](B ?›2](3T›0](B ?›2](3<›0](B ?›2](4]›0](B ?›2](41›0](B
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
85 ?›2](4-›0](B ?›2](4A›0](B ?›2](4S›0](B ?›2](45›0](B ?›2](4Q›0](B ?›2](4M›0](B ?›2](3F›0](B ?›2](4=›0](B ?›2](3-›0](B ?›2](4O›0](B ?›2](4!›0](B ?< ?| ?> nil ])))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
86
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
87 (defvar arabic-mode-map
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
88 (let ((map (make-keymap)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
89 (substitute-key-definition 'self-insert-command
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
90 'arabic-self-insert-command
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
91 map global-map)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
92
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
93 (define-key map [(control c) (control c)] 'arabic-mode)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
94 (define-key map [(control d)] 'arabic-delete-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
95 (define-key map [(control k)] 'arabic-kill-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
96 (define-key map [(control m)] 'arabic-newline)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
97 (define-key map [(control o)] 'arabic-open-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
98 (define-key map [(control w)] 'arabic-kill-region)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
99 (define-key map [(control y)] 'arabic-yank)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
100 (define-key map [delete] 'arabic-backward-delete-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
101 (define-key map [(meta d)] 'arabic-delete-word)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
102 (define-key map [(meta y)] 'arabic-yank-pop)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
103 (define-key map [(meta z)] 'arabic-help)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
104 (define-key map [(meta \\)] 'arabic-toggle-input-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
105 (define-key map [(meta delete)] 'arabic-backward-kill-word)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
106
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
107 (define-key map [(control n)] 'visual-next-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
108 (define-key map [(control p)] 'visual-previous-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
109 (define-key map [(meta <)] 'visual-beginning-of-buffer)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
110 (define-key map [(meta >)] 'visual-end-of-buffer)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
111 (define-key map [up] 'visual-previous-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
112 (define-key map [down] 'visual-next-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
113 (define-key map [home] 'visual-beginning-of-buffer)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
114 (define-key map [end] 'visual-end-of-buffer)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
115 (define-key map [left] 'visual-move-to-left-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
116 (define-key map [right] 'visual-move-to-right-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
117 (define-key map [(meta left)] 'visual-move-to-left-word)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
118 (define-key map [(meta right)] 'visual-move-to-right-word)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
119
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
120 (if visual-use-lr-commands
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
121 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
122 (define-key map [(control a)] 'visual-left-end-of-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
123 (define-key map [(control b)] 'visual-move-to-left-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
124 (define-key map [(control e)] 'visual-right-end-of-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
125 (define-key map [(control f)] 'visual-move-to-right-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
126 (define-key map [(meta b)] 'visual-move-to-left-word)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
127 (define-key map [(meta f)] 'visual-move-to-right-word))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
128 (define-key map [(control a)] 'visual-beginning-of-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
129 (define-key map [(control b)] 'visual-backward-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
130 (define-key map [(control e)] 'visual-end-of-line)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
131 (define-key map [(control f)] 'visual-forward-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
132 (define-key map [(meta b)] 'visual-backward-word)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
133 (define-key map [(meta f)] 'visual-forward-word))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
134
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
135 (cond
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
136 ((eq arabic-input-keymap 'arabic-keymap-0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
137 (define-key map [?~] 'arabic-insert-madda)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
138 (define-key map [?'] 'arabic-insert-hamza)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
139 (define-key map [?a] 'arabic-insert-alif)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
140 (define-key map [?_] 'arabic-make-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
141 (define-key map [?|] 'arabic-cut-connection))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
142 ((eq arabic-input-keymap 'arabic-keymap-1)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
143 (define-key map [?~] 'arabic-insert-madda)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
144 (define-key map [?'] 'arabic-insert-hamza)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
145 (define-key map [?a] 'arabic-insert-alif)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
146 (define-key map [?_] 'arabic-make-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
147 (define-key map [?|] 'arabic-cut-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
148 (define-key map [(alt \;)] 'arabic-insert-gaaf)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
149 (define-key map [(alt v)] 'arabic-insert-isolated-hamza))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
150 (t
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
151 (define-key map [(alt z)] 'arabic-insert-madda)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
152 (define-key map [(alt x)] 'arabic-insert-hamza)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
153 (define-key map [(alt h)] 'arabic-insert-alif)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
154 (define-key map [(alt _)] 'arabic-make-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
155 (define-key map [(alt |)] 'arabic-cut-connection)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
156
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
157 map)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
158 "minor-mode-keymap for arabic-mode.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
159
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
160 (if (not (assq 'arabic-mode minor-mode-map-alist))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
161 (setq minor-mode-map-alist
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
162 (cons (cons 'arabic-mode arabic-mode-map) minor-mode-map-alist)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
163
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
164 (defvar arabic-help-string
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
165 (cond
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
166 ((eq arabic-input-keymap 'arabic-keymap-0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
167 "\
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
168 Keymap in Arabic-mode
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
169
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
170 +----------------------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
171 |! ›2](3"›0](B |@ |# |$ |% |^ |& |* |( ›2](3#›0](B |) ›2](3$›0](B |_ |+ |~ |
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
172 |1 (2"(B |2 (2#(B |3 (2$(B |4 (2%(B |5 (2&(B |6 (2'(B |7 (2((B |8 (2)(B |9 (2*(B |0 (2!(B |- |= |` ›2](4M›0](B|
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
173 +----------------------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
174 |Q |W |E |R |T ›2](4E›0](B|Y |U |I |O |P |
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
175 |q ›2](4S›0](B|w ›2](3^›0](B |e |r ›2](3F›0](B |t ›2](4%›0](B|y ›2](4_›0](B|u |i |o ›2](3<›0](B |p ›2](4e›0](B|
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
176 +--------------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
177 |A ›2](4]›0](B|S ›2](4=›0](B|D ›2](4A›0](B|F |G ›2](4O›0](B|H ›2](4-›0](B|J |K ›2](41›0](B|L |: ›2](3'›0](B |\" ›2](3-›0](B |
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
178 |a ›2](38›0](B |s ›2](45›0](B|d ›2](3B›0](B |f ›2](4Q›0](B|g ›2](4k›0](B|h ›2](3Z›0](B |j ›2](4)›0](B|k ›2](4U›0](B|l ›2](4Y›0](B|; ›2](3(›0](B |' |
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
179 +------------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
180 |Z ›2](4I›0](B|X ›2](3h›0](B |C ›2](4g›0](B|V |B |N |M |< ›2](3*›0](B |> ›2](3+›0](B |? ›2](3)›0](B |
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
181 |z ›2](3H›0](B |x ›2](3D›0](B |c ›2](4'›0](B|v |b ›2](4#›0](B|n ›2](4[›0](B|m ›2](3T›0](B |, ›2](3%›0](B |. ›2](3&›0](B |/ ›2](49›0](B|
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
182 +-------------------------------------------------+")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
183
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
184 ((eq arabic-input-keymap 'arabic-keymap-1)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
185 "\
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
186 Keymap in Arabic-mode +--------------+
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
187 | ALT SHIFT|
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
188 +-------------------------------------------------+ |ASCII ARABIC|
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
189 | ›2](3"›0](B | | | | | | | | ›2](3#›0](B | ›2](3$›0](B | +--------------+
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
190 |1 (2"(B |2 (2#(B |3 (2$(B |4 (2%(B |5 (2&(B |6 (2'(B |7 (2((B |8 (2)(B |9 (2*(B |0 (2!(B |
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
191 +-------------------------------------------------------------+
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
192 | | | | | | | | | | | | |
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
193 |q ›2](4A›0](B|w ›2](4=›0](B|e ›2](4S›0](B|r ›2](4Q›0](B|t ›2](4O›0](B|y ›2](4M›0](B|u ›2](3Z›0](B |i |o ›2](41›0](B|p ›2](4-›0](B|[ ›2](4)›0](B|] ›2](4g›0](B|
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
194 +-----------------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
195 | | | | ›2](4e›0](B| ›2](3.›0](B | | | | |›2](4k›0](B ›2](3'›0](B|
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
196 |a ›2](49›0](B|s ›2](45›0](B|d ›2](4_›0](B|f ›2](4#›0](B|g ›2](38›0](B |h ›2](4%›0](B|j ›2](4Y›0](B|k ›2](4[›0](B|l ›2](3T›0](B |; ›2](4U›0](B|
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
197 +---------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
198 | | | |›2](3-›0](B ›2](30›0](B | ›2](3h›0](B | | | ›2](3*›0](B | ›2](3+›0](B | ›2](3)›0](B |
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
199 |z ›2](4I›0](B|x ›2](4E›0](B|c ›2](3D›0](B |v ›2](3B›0](B |b ›2](3H›0](B |n ›2](3F›0](B |m ›2](3^›0](B |, ›2](3%›0](B |. ›2](3&›0](B |/ |
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
200 +-------------------------------------------------+")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
201
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
202 (t
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
203 "\
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
204 +-----------------+
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
205 |S-ASCII S-Arabic|
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
206 | ASCII Arabic | +----+
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
207 +-----------------+ || ||
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
208 |\\ \\|
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
209 +-----------------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
210 |! ›2](3"›0](B|@ @|# #|$ $|% %|^ ^|& &|* *|( ›2](3#›0](B|) ›2](3$›0](B|_ _|+ +|
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
211 |1 (2"(B|2 (2#(B|3 (2$(B|4 (2%(B|5 (2&(B|6 (2'(B|7 (2((B|8 (2)(B|9 (2*(B|0 (2!(B|- -|= =|
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
212 +-------------------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
213 |Q |W |E |R |T ›2](3d›0](B|Y ›2](34›0](B|U '|I |O |P ›2](3(›0](B|{ <|} >|
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
214 | ›2](4A›0](B| ›2](4=›0](B| ›2](4'›0](B| ›2](4S›0](B| ›2](4Q›0](B| ›2](4O›0](B| ›2](4M›0](B| ›2](3Z›0](B| ›2](41›0](B| ›2](4-›0](B|[ ›2](4)›0](B|] ›2](3B›0](B|
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
215 +-------------------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
216 |A |S |D [|F ]|G ›2](3c›0](B|H ›2](30›0](B|J |K ›2](3%›0](B|L /|: ›2](3'›0](B|\" \" |~›2](3,›0](B |
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
217 | ›2](49›0](B| ›2](45›0](B| ›2](4_›0](B| ›2](4#›0](B| ›2](4Y›0](B| ›2](38›0](B| ›2](4%›0](B| ›2](4[›0](B| ›2](3T›0](B|\; ›2](4U›0](B|' ›2](4E›0](B|` ›2](3D›0](B|
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
218 +-----------------------------------------------------------+
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
219 |Z ~|X |C {|V }|B ›2](3b›0](B|N ›2](3.›0](B|M `|< ,|> ›2](3&›0](B|? ›2](3)›0](B|
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
220 | ›2](4!›0](B| ›2](3-›0](B| ›2](32›0](B| ›2](3F›0](B| ›2](3e›0](B| ›2](4]›0](B| ›2](3<›0](B|, ›2](3^›0](B|. ›2](3H›0](B|/ ›2](4I›0](B|
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
221 +-------------------------------------------------+"))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
222
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
223 "Document shown by arabic-help (M-z).")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
224
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
225 ;;;###autoload
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
226 (defun arabic-mode (&optional arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
227 "Toggle arabic-mode. With ARG, turn arabic-mode on iff ARG is positive."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
228 (interactive "P")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
229 (if (null arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
230 (if arabic-mode (exit-arabic-mode) (enter-arabic-mode))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
231 (if (> (prefix-numeric-value arg) 0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
232 (enter-arabic-mode)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
233 (exit-arabic-mode))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
234
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
235 (defun enter-arabic-mode nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
236 "Enter arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
237 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
238 (if (not arabic-mode)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
239 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
240 (setq arabic-mode t
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
241 arabic-input-arabic-char t
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
242 arabic-mode-indicator " ›2](3=a:GJ›0](B")
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
243 (redraw-modeline t)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
244 (message "M-z to display arabic keymap.")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
245 (run-hooks 'arabic-mode-hooks))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
246
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
247 (defun exit-arabic-mode nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
248 "Exit arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
249 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
250 (if arabic-mode
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
251 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
252 (setq arabic-mode nil)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
253 (redraw-modeline t))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
254
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
255 (defconst *arabic-adding-connection-to-right*
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
256 '((?›2](3.›0](B . ?›2](3/›0](B ) (?›2](3/›0](B . ?›2](3/›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
257 (?›2](30›0](B . ?›2](31›0](B ) (?›2](31›0](B . ?›2](31›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
258 (?›2](32›0](B . ?›2](33›0](B ) (?›2](33›0](B . ?›2](33›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
259 (?›2](34›0](B . ?›2](35›0](B ) (?›2](35›0](B . ?›2](35›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
260 (?›2](4!›0](B . ?›2](4"›0](B) (?›2](36›0](B . ?›2](37›0](B ) (?›2](37›0](B . ?›2](37›0](B ) (?›2](4"›0](B . ?›2](4"›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
261 (?›2](36›0](B . ?›2](37›0](B ) (?›2](37›0](B . ?›2](37›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
262 (?›2](38›0](B . ?›2](39›0](B ) (?›2](39›0](B . ?›2](39›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
263 (?›2](4#›0](B . ?›2](4$›0](B) (?›2](3:›0](B . ?›2](3;›0](B ) (?›2](3;›0](B . ?›2](3;›0](B ) (?›2](4$›0](B . ?›2](4$›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
264 (?›2](3<›0](B . ?›2](3=›0](B ) (?›2](3=›0](B . ?›2](3=›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
265 (?›2](4%›0](B . ?›2](4&›0](B) (?›2](3>›0](B . ?›2](3?›0](B ) (?›2](3?›0](B . ?›2](3?›0](B ) (?›2](4&›0](B . ?›2](4&›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
266 (?›2](4'›0](B . ?›2](4(›0](B) (?›2](3@›0](B . ?›2](3A›0](B ) (?›2](3A›0](B . ?›2](3A›0](B ) (?›2](4(›0](B . ?›2](4(›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
267 (?›2](4)›0](B . ?›2](4,›0](B) (?›2](4*›0](B . ?›2](4+›0](B) (?›2](4+›0](B . ?›2](4+›0](B) (?›2](4,›0](B . ?›2](4,›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
268 (?›2](4-›0](B . ?›2](40›0](B) (?›2](4.›0](B . ?›2](4/›0](B) (?›2](4/›0](B . ?›2](4/›0](B) (?›2](40›0](B . ?›2](40›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
269 (?›2](41›0](B . ?›2](44›0](B) (?›2](42›0](B . ?›2](43›0](B) (?›2](43›0](B . ?›2](43›0](B) (?›2](44›0](B . ?›2](44›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
270 (?›2](3B›0](B . ?›2](3C›0](B ) (?›2](3C›0](B . ?›2](3C›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
271 (?›2](3D›0](B . ?›2](3E›0](B ) (?›2](3E›0](B . ?›2](3E›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
272 (?›2](3F›0](B . ?›2](3G›0](B ) (?›2](3G›0](B . ?›2](3G›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
273 (?›2](3H›0](B . ?›2](3I›0](B ) (?›2](3I›0](B . ?›2](3I›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
274 (?›2](45›0](B . ?›2](48›0](B) (?›2](46›0](B . ?›2](47›0](B) (?›2](47›0](B . ?›2](47›0](B) (?›2](48›0](B . ?›2](48›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
275 (?›2](49›0](B . ?›2](4<›0](B) (?›2](4:›0](B . ?›2](4;›0](B) (?›2](4;›0](B . ?›2](4;›0](B) (?›2](4<›0](B . ?›2](4<›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
276 (?›2](4=›0](B . ?›2](4@›0](B) (?›2](4>›0](B . ?›2](4?›0](B) (?›2](4?›0](B . ?›2](4?›0](B) (?›2](4@›0](B . ?›2](4@›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
277 (?›2](4A›0](B . ?›2](4D›0](B) (?›2](4B›0](B . ?›2](4C›0](B) (?›2](4C›0](B . ?›2](4C›0](B) (?›2](4D›0](B . ?›2](4D›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
278 (?›2](4E›0](B . ?›2](4H›0](B) (?›2](4F›0](B . ?›2](4G›0](B) (?›2](4G›0](B . ?›2](4G›0](B) (?›2](4H›0](B . ?›2](4H›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
279 (?›2](4I›0](B . ?›2](4L›0](B) (?›2](4J›0](B . ?›2](4K›0](B) (?›2](4K›0](B . ?›2](4K›0](B) (?›2](4L›0](B . ?›2](4L›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
280 (?›2](4M›0](B . ?›2](4N›0](B) (?›2](3J›0](B . ?›2](3K›0](B ) (?›2](3K›0](B . ?›2](3K›0](B ) (?›2](4N›0](B . ?›2](4N›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
281 (?›2](4O›0](B . ?›2](4P›0](B) (?›2](3L›0](B . ?›2](3M›0](B ) (?›2](3M›0](B . ?›2](3M›0](B ) (?›2](4P›0](B . ?›2](4P›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
282 (?›2](4Q›0](B . ?›2](4R›0](B) (?›2](3N›0](B . ?›2](3O›0](B ) (?›2](3O›0](B . ?›2](3O›0](B ) (?›2](4R›0](B . ?›2](4R›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
283 (?›2](4S›0](B . ?›2](4T›0](B) (?›2](3P›0](B . ?›2](3Q›0](B ) (?›2](3Q›0](B . ?›2](3Q›0](B ) (?›2](4T›0](B . ?›2](4T›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
284 (?›2](4U›0](B . ?›2](4X›0](B) (?›2](4V›0](B . ?›2](4W›0](B) (?›2](4W›0](B . ?›2](4W›0](B) (?›2](4X›0](B . ?›2](4X›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
285 (?›2](4Y›0](B . ?›2](4Z›0](B) (?›2](3R›0](B . ?›2](3S›0](B ) (?›2](3S›0](B . ?›2](3S›0](B ) (?›2](4Z›0](B . ?›2](4Z›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
286 (?›2](3T›0](B . ?›2](3W›0](B ) (?›2](3U›0](B . ?›2](3V›0](B ) (?›2](3V›0](B . ?›2](3V›0](B ) (?›2](3W›0](B . ?›2](3W›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
287 (?›2](4[›0](B . ?›2](4\›0](B) (?›2](3X›0](B . ?›2](3Y›0](B ) (?›2](3Y›0](B . ?›2](3Y›0](B ) (?›2](4\›0](B . ?›2](4\›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
288 (?›2](3Z›0](B . ?›2](3]›0](B ) (?›2](3[›0](B . ?›2](3\›0](B ) (?›2](3\›0](B . ?›2](3\›0](B ) (?›2](3]›0](B . ?›2](3]›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
289 (?›2](3^›0](B . ?›2](3_›0](B ) (?›2](3_›0](B . ?›2](3_›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
290 (?›2](4]›0](B . ?›2](4^›0](B) (?›2](4^›0](B . ?›2](4^›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
291 (?›2](4_›0](B . ?›2](4`›0](B) (?›2](3`›0](B . ?›2](3a›0](B ) (?›2](3a›0](B . ?›2](3a›0](B ) (?›2](4`›0](B . ?›2](4`›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
292 (?›2](3b›0](B . ?›2](4a›0](B) (?›2](4a›0](B . ?›2](4a›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
293 (?›2](3c›0](B . ?›2](4b›0](B) (?›2](4b›0](B . ?›2](4b›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
294 (?›2](3d›0](B . ?›2](4c›0](B) (?›2](4c›0](B . ?›2](4c›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
295 (?›2](3e›0](B . ?›2](4d›0](B) (?›2](4d›0](B . ?›2](4d›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
296 (?›2](4e›0](B . ?›2](4f›0](B) (?›2](3f›0](B . ?›2](3g›0](B ) (?›2](3g›0](B . ?›2](3g›0](B ) (?›2](4f›0](B . ?›2](4f›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
297 (?›2](4g›0](B . ?›2](4j›0](B) (?›2](4h›0](B . ?›2](4i›0](B) (?›2](4i›0](B . ?›2](4i›0](B) (?›2](4j›0](B . ?›2](4j›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
298 (?›2](3h›0](B . ?›2](3i›0](B ) (?›2](3i›0](B . ?›2](3i›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
299 (?›2](4k›0](B . ?›2](4n›0](B) (?›2](4l›0](B . ?›2](4m›0](B) (?›2](4m›0](B . ?›2](4m›0](B) (?›2](4n›0](B . ?›2](4n›0](B)))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
300
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
301 (defconst *arabic-adding-connection-to-left*
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
302 '((?›2](4!›0](B . ?›2](36›0](B ) (?›2](36›0](B . ?›2](36›0](B ) (?›2](37›0](B . ?›2](37›0](B ) (?›2](4"›0](B . ?›2](37›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
303 (?›2](4#›0](B . ?›2](3:›0](B ) (?›2](3:›0](B . ?›2](3:›0](B ) (?›2](3;›0](B . ?›2](3;›0](B ) (?›2](4$›0](B . ?›2](3;›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
304 (?›2](4%›0](B . ?›2](3>›0](B ) (?›2](3>›0](B . ?›2](3>›0](B ) (?›2](3?›0](B . ?›2](3?›0](B ) (?›2](4&›0](B . ?›2](3?›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
305 (?›2](4'›0](B . ?›2](3@›0](B ) (?›2](3@›0](B . ?›2](3@›0](B ) (?›2](3A›0](B . ?›2](3A›0](B ) (?›2](4(›0](B . ?›2](3A›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
306 (?›2](4)›0](B . ?›2](4*›0](B) (?›2](4*›0](B . ?›2](4*›0](B) (?›2](4+›0](B . ?›2](4+›0](B) (?›2](4,›0](B . ?›2](4+›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
307 (?›2](4-›0](B . ?›2](4.›0](B) (?›2](4.›0](B . ?›2](4.›0](B) (?›2](4/›0](B . ?›2](4/›0](B) (?›2](40›0](B . ?›2](4/›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
308 (?›2](41›0](B . ?›2](42›0](B) (?›2](42›0](B . ?›2](42›0](B) (?›2](43›0](B . ?›2](43›0](B) (?›2](44›0](B . ?›2](43›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
309 (?›2](45›0](B . ?›2](46›0](B) (?›2](46›0](B . ?›2](46›0](B) (?›2](47›0](B . ?›2](47›0](B) (?›2](48›0](B . ?›2](47›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
310 (?›2](49›0](B . ?›2](4:›0](B) (?›2](4:›0](B . ?›2](4:›0](B) (?›2](4;›0](B . ?›2](4;›0](B) (?›2](4<›0](B . ?›2](4;›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
311 (?›2](4=›0](B . ?›2](4>›0](B) (?›2](4>›0](B . ?›2](4>›0](B) (?›2](4?›0](B . ?›2](4?›0](B) (?›2](4@›0](B . ?›2](4?›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
312 (?›2](4A›0](B . ?›2](4B›0](B) (?›2](4B›0](B . ?›2](4B›0](B) (?›2](4C›0](B . ?›2](4C›0](B) (?›2](4D›0](B . ?›2](4C›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
313 (?›2](4E›0](B . ?›2](4F›0](B) (?›2](4F›0](B . ?›2](4F›0](B) (?›2](4G›0](B . ?›2](4G›0](B) (?›2](4H›0](B . ?›2](4G›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
314 (?›2](4I›0](B . ?›2](4J›0](B) (?›2](4J›0](B . ?›2](4J›0](B) (?›2](4K›0](B . ?›2](4K›0](B) (?›2](4L›0](B . ?›2](4K›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
315 (?›2](4M›0](B . ?›2](3J›0](B ) (?›2](3J›0](B . ?›2](3J›0](B ) (?›2](3K›0](B . ?›2](3K›0](B ) (?›2](4N›0](B . ?›2](3K›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
316 (?›2](4O›0](B . ?›2](3L›0](B ) (?›2](3L›0](B . ?›2](3L›0](B ) (?›2](3M›0](B . ?›2](3M›0](B ) (?›2](4P›0](B . ?›2](3M›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
317 (?›2](4Q›0](B . ?›2](3N›0](B ) (?›2](3N›0](B . ?›2](3N›0](B ) (?›2](3O›0](B . ?›2](3O›0](B ) (?›2](4R›0](B . ?›2](3O›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
318 (?›2](4S›0](B . ?›2](3P›0](B ) (?›2](3P›0](B . ?›2](3P›0](B ) (?›2](3Q›0](B . ?›2](3Q›0](B ) (?›2](4T›0](B . ?›2](3Q›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
319 (?›2](4U›0](B . ?›2](4V›0](B) (?›2](4V›0](B . ?›2](4V›0](B) (?›2](4W›0](B . ?›2](4W›0](B) (?›2](4X›0](B . ?›2](4W›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
320 (?›2](4Y›0](B . ?›2](3R›0](B ) (?›2](3R›0](B . ?›2](3R›0](B ) (?›2](3S›0](B . ?›2](3S›0](B ) (?›2](4Z›0](B . ?›2](3S›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
321 (?›2](3T›0](B . ?›2](3U›0](B ) (?›2](3U›0](B . ?›2](3U›0](B ) (?›2](3V›0](B . ?›2](3V›0](B ) (?›2](3W›0](B . ?›2](3V›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
322 (?›2](4[›0](B . ?›2](3X›0](B ) (?›2](3X›0](B . ?›2](3X›0](B ) (?›2](3Y›0](B . ?›2](3Y›0](B ) (?›2](4\›0](B . ?›2](3Y›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
323 (?›2](3Z›0](B . ?›2](3[›0](B ) (?›2](3[›0](B . ?›2](3[›0](B ) (?›2](3\›0](B . ?›2](3\›0](B ) (?›2](3]›0](B . ?›2](3\›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
324 (?›2](4_›0](B . ?›2](3`›0](B ) (?›2](3`›0](B . ?›2](3`›0](B ) (?›2](3a›0](B . ?›2](3a›0](B ) (?›2](4`›0](B . ?›2](3a›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
325 (?›2](4e›0](B . ?›2](3f›0](B ) (?›2](3f›0](B . ?›2](3f›0](B ) (?›2](3g›0](B . ?›2](3g›0](B ) (?›2](4f›0](B . ?›2](3g›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
326 (?›2](4g›0](B . ?›2](4h›0](B) (?›2](4h›0](B . ?›2](4h›0](B) (?›2](4i›0](B . ?›2](4i›0](B) (?›2](4j›0](B . ?›2](4i›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
327 (?›2](4k›0](B . ?›2](4l›0](B) (?›2](4l›0](B . ?›2](4l›0](B) (?›2](4m›0](B . ?›2](4m›0](B) (?›2](4n›0](B . ?›2](4m›0](B)))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
328
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
329 (defconst *arabic-removing-connection-from-right*
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
330 '((?›2](3/›0](B . ?›2](3.›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
331 (?›2](31›0](B . ?›2](30›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
332 (?›2](33›0](B . ?›2](32›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
333 (?›2](35›0](B . ?›2](34›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
334 (?›2](4"›0](B . ?›2](4!›0](B) (?›2](37›0](B . ?›2](36›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
335 (?›2](39›0](B . ?›2](38›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
336 (?›2](4$›0](B . ?›2](4#›0](B) (?›2](3;›0](B . ?›2](3:›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
337 (?›2](3=›0](B . ?›2](3<›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
338 (?›2](4&›0](B . ?›2](4%›0](B) (?›2](3?›0](B . ?›2](3>›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
339 (?›2](4(›0](B . ?›2](4'›0](B) (?›2](3A›0](B . ?›2](3@›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
340 (?›2](4,›0](B . ?›2](4)›0](B) (?›2](4+›0](B . ?›2](4*›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
341 (?›2](40›0](B . ?›2](4-›0](B) (?›2](4/›0](B . ?›2](4.›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
342 (?›2](44›0](B . ?›2](41›0](B) (?›2](43›0](B . ?›2](42›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
343 (?›2](3C›0](B . ?›2](3B›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
344 (?›2](3E›0](B . ?›2](3D›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
345 (?›2](3G›0](B . ?›2](3F›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
346 (?›2](3I›0](B . ?›2](3H›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
347 (?›2](48›0](B . ?›2](45›0](B) (?›2](47›0](B . ?›2](46›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
348 (?›2](4<›0](B . ?›2](49›0](B) (?›2](4;›0](B . ?›2](4:›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
349 (?›2](4@›0](B . ?›2](4=›0](B) (?›2](4?›0](B . ?›2](4>›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
350 (?›2](4D›0](B . ?›2](4A›0](B) (?›2](4C›0](B . ?›2](4B›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
351 (?›2](4H›0](B . ?›2](4E›0](B) (?›2](4G›0](B . ?›2](4F›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
352 (?›2](4L›0](B . ?›2](4I›0](B) (?›2](4K›0](B . ?›2](4J›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
353 (?›2](4N›0](B . ?›2](4M›0](B) (?›2](3K›0](B . ?›2](3J›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
354 (?›2](4P›0](B . ?›2](4O›0](B) (?›2](3M›0](B . ?›2](3L›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
355 (?›2](4R›0](B . ?›2](4Q›0](B) (?›2](3O›0](B . ?›2](3N›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
356 (?›2](4T›0](B . ?›2](4S›0](B) (?›2](3Q›0](B . ?›2](3P›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
357 (?›2](4X›0](B . ?›2](4U›0](B) (?›2](4W›0](B . ?›2](4V›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
358 (?›2](4Z›0](B . ?›2](4Y›0](B) (?›2](3S›0](B . ?›2](3R›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
359 (?›2](3W›0](B . ?›2](3T›0](B ) (?›2](3V›0](B . ?›2](3U›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
360 (?›2](4\›0](B . ?›2](4[›0](B) (?›2](3Y›0](B . ?›2](3X›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
361 (?›2](3]›0](B . ?›2](3Z›0](B ) (?›2](3\›0](B . ?›2](3[›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
362 (?›2](3_›0](B . ?›2](3^›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
363 (?›2](4^›0](B . ?›2](4]›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
364 (?›2](4`›0](B . ?›2](4_›0](B) (?›2](3a›0](B . ?›2](3`›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
365 (?›2](4a›0](B . ?›2](3b›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
366 (?›2](4b›0](B . ?›2](3c›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
367 (?›2](4c›0](B . ?›2](3d›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
368 (?›2](4d›0](B . ?›2](3e›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
369 (?›2](4f›0](B . ?›2](4e›0](B) (?›2](3g›0](B . ?›2](3f›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
370 (?›2](4j›0](B . ?›2](4g›0](B) (?›2](4i›0](B . ?›2](4h›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
371 (?›2](3i›0](B . ?›2](3h›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
372 (?›2](4n›0](B . ?›2](4k›0](B) (?›2](4m›0](B . ?›2](4l›0](B)))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
373
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
374 (defconst *arabic-removing-connection-from-left*
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
375 '((?›2](36›0](B . ?›2](4!›0](B) (?›2](37›0](B . ?›2](4"›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
376 (?›2](3:›0](B . ?›2](4#›0](B) (?›2](3;›0](B . ?›2](4$›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
377 (?›2](3>›0](B . ?›2](4%›0](B) (?›2](3?›0](B . ?›2](4&›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
378 (?›2](3@›0](B . ?›2](4'›0](B) (?›2](3A›0](B . ?›2](4(›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
379 (?›2](4*›0](B . ?›2](4)›0](B) (?›2](4+›0](B . ?›2](4,›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
380 (?›2](4.›0](B . ?›2](4-›0](B) (?›2](4/›0](B . ?›2](40›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
381 (?›2](42›0](B . ?›2](41›0](B) (?›2](43›0](B . ?›2](44›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
382 (?›2](46›0](B . ?›2](45›0](B) (?›2](47›0](B . ?›2](48›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
383 (?›2](4:›0](B . ?›2](49›0](B) (?›2](4;›0](B . ?›2](4<›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
384 (?›2](4>›0](B . ?›2](4=›0](B) (?›2](4?›0](B . ?›2](4@›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
385 (?›2](4D›0](B . ?›2](4A›0](B) (?›2](4C›0](B . ?›2](4A›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
386 (?›2](4F›0](B . ?›2](4E›0](B) (?›2](4G›0](B . ?›2](4H›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
387 (?›2](4J›0](B . ?›2](4I›0](B) (?›2](4K›0](B . ?›2](4L›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
388 (?›2](3J›0](B . ?›2](4M›0](B) (?›2](3K›0](B . ?›2](4N›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
389 (?›2](3L›0](B . ?›2](4O›0](B) (?›2](3M›0](B . ?›2](4P›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
390 (?›2](3N›0](B . ?›2](4Q›0](B) (?›2](3O›0](B . ?›2](4R›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
391 (?›2](3P›0](B . ?›2](4S›0](B) (?›2](3Q›0](B . ?›2](4T›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
392 (?›2](4V›0](B . ?›2](4U›0](B) (?›2](4W›0](B . ?›2](4X›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
393 (?›2](3R›0](B . ?›2](4Y›0](B) (?›2](3S›0](B . ?›2](4Z›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
394 (?›2](3U›0](B . ?›2](3T›0](B ) (?›2](3V›0](B . ?›2](3W›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
395 (?›2](3X›0](B . ?›2](4[›0](B) (?›2](3Y›0](B . ?›2](4\›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
396 (?›2](3[›0](B . ?›2](3Z›0](B ) (?›2](3\›0](B . ?›2](3]›0](B )
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
397 (?›2](3`›0](B . ?›2](4_›0](B) (?›2](3a›0](B . ?›2](4`›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
398 (?›2](4h›0](B . ?›2](4g›0](B) (?›2](4i›0](B . ?›2](4j›0](B)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
399 (?›2](4l›0](B . ?›2](4k›0](B) (?›2](4m›0](B . ?›2](4n›0](B)))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
400
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
401 (defun arabic-make-connection nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
402 "If possible, tie the two characters around the cursor."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
403 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
404 (let ((lch (assoc (visual-char-left) *arabic-adding-connection-to-right*))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
405 (rch (assoc (visual-char-right) *arabic-adding-connection-to-left*)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
406 (if (not (and lch rch))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
407 (arabic-cut-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
408 (visual-replace-left-1-char (cdr lch))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
409 (visual-replace-right-1-char (cdr rch)))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
410
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
411 (defun arabic-cut-connection nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
412 "Remove the connection between the two characters around the cursor, if any."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
413 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
414 (let
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
415 ((lch (assoc (visual-char-left) *arabic-removing-connection-from-right*))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
416 (rch (assoc (visual-char-right) *arabic-removing-connection-from-left*)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
417 (if lch
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
418 (visual-replace-left-1-char (cdr lch)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
419 (if rch
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
420 (visual-replace-right-1-char (cdr rch)))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
421
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
422 (defun arabic-insert-char (ch arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
423 "Insert ARG (2nd arg; > 0) number of CHs (1st arg; character) around
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
424 visual point.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
425 If CH is l2r, inserted on the left. Otherwise, on the right."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
426 (while (> arg 0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
427 (arabic-insert-1-char ch)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
428 (setq arg (1- arg))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
429
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
430 (defun arabic-insert-1-char (ch)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
431 "Insert CH (1st arg; character) around visual point.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
432 If CH is l2r, inserted on the left. Otherwise, on the right."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
433 (if (= (visual-char-direction ch) 0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
434 ; if visual-char-direction = 0, always disjoint.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
435 (progn
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
436 (arabic-cut-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
437 (visual-insert-left-1-char ch))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
438 (visual-insert-left-1-char ch)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
439 (arabic-make-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
440 (visual-move-to-left-1-char)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
441 (arabic-make-connection)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
442
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
443 (defun arabic-self-insert-command (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
444 "Self-insert-command for arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
445 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
446 (let ((ch last-command-char))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
447 (if arabic-input-arabic-char
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
448 (setq ch (aref arabic-translate-table (- ch 32))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
449 (if (null ch)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
450 (beep)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
451 (while (> arg 0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
452 (arabic-keyboard-insert-1-char ch)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
453 (setq arg (1- arg))))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
454
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
455 (defun arabic-keyboard-insert-1-char (ch)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
456 "Insert CH (1st arg; Arabic character) at visual cursor position.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
457 if last-command is arabic-cut-connection, CH will not connected to the
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
458 right adjacent character (but connected to the left, if possible)."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
459 (let ((rch (visual-char-right)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
460 (cond
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
461 ((= (visual-char-direction ch) 0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
462 (arabic-cut-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
463 (visual-insert-left-1-char ch))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
464 ((eq last-command 'arabic-cut-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
465 (visual-insert-right-1-char ch)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
466 (arabic-make-connection))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
467 (t
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
468 (arabic-insert-1-char ch)))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
469
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
470 (defun arabic-insert-gaaf (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
471 "Insert gaaf as if it were typed from keyboard."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
472 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
473 (while (> arg 0)
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
474 (arabic-keyboard-insert-1-char ?›2](4k›0](B)
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
475 (setq arg (1- arg))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
476
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
477 (defun arabic-insert-isolated-hamza (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
478 "Insert an isolated hamza as if it were typed from keyboard."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
479 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
480 (while (> arg 0)
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
481 (arabic-keyboard-insert-1-char ?›2](3-›0](B)
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
482 (setq arg (1- arg))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
483
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
484 (defun arabic-insert-madda nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
485 "Put madda on the previous alif."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
486 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
487 (let ((rch (visual-char-right)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
488 (cond
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
489 ((eq rch ?›2](38›0](B ) (visual-replace-right-1-char ?›2](3.›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
490 ((eq rch ?›2](39›0](B ) (visual-replace-right-1-char ?›2](3/›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
491 ((eq rch ?›2](3e›0](B ) (visual-replace-right-1-char ?›2](3b›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
492 ((eq rch ?›2](4d›0](B) (visual-replace-right-1-char ?›2](4a›0](B))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
493 (t (beep)))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
494
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
495 (defun arabic-insert-alif (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
496 "Insert ARG number of alif's.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
497 If the previous character is a laam, replace it with an alif+laam ligature."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
498 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
499 (let (rch)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
500 (while (> arg 0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
501 (setq rch (visual-char-right))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
502 (cond
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
503 ((eq last-command 'arabic-cut-connection)
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
504 (visual-insert-right-1-char ?›2](38›0](B))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
505 ((or (eq rch ?›2](4Y›0](B) (eq rch ?›2](3R›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
506 (visual-replace-right-1-char ?›2](3e›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
507 ((or (eq rch ?›2](3S›0](B ) (eq rch ?›2](4Z›0](B))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
508 (visual-replace-right-1-char ?›2](4d›0](B))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
509 (t
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
510 (visual-insert-left-1-char ?›2](38›0](B )
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
511 (arabic-make-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
512 (visual-move-to-left-1-char)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
513 (setq arg (1- arg)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
514 (arabic-cut-connection)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
515
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
516 (defun arabic-insert-hamza (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
517 "Insert ARG number of hamza's.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
518 Put it on/under previous characters, if possible."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
519 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
520 (let (rch)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
521 (while (> arg 0)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
522 (setq rch (visual-char-right))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
523 (cond
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
524 ((eq last-command 'arabic-cut-connection)
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
525 (visual-insert-right-1-char ?›2](3-›0](B))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
526 ((eq rch ?›2](38›0](B ) (visual-replace-right-1-char ?›2](30›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
527 ((eq rch ?›2](39›0](B ) (visual-replace-right-1-char ?›2](31›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
528 ((eq rch ?›2](30›0](B ) (visual-replace-right-1-char ?›2](34›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
529 ((eq rch ?›2](31›0](B ) (visual-replace-right-1-char ?›2](35›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
530 ((eq rch ?›2](3^›0](B ) (visual-replace-right-1-char ?›2](32›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
531 ((eq rch ?›2](3_›0](B ) (visual-replace-right-1-char ?›2](33›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
532 ((eq rch ?›2](4_›0](B) (visual-replace-right-1-char ?›2](4!›0](B))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
533 ((eq rch ?›2](3`›0](B ) (visual-replace-right-1-char ?›2](36›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
534 ((eq rch ?›2](3a›0](B ) (visual-replace-right-1-char ?›2](37›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
535 ((eq rch ?›2](4`›0](B) (visual-replace-right-1-char ?›2](4"›0](B))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
536 ((eq rch ?›2](4]›0](B) (visual-replace-right-1-char ?›2](4!›0](B))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
537 ((eq rch ?›2](4^›0](B) (visual-replace-right-1-char ?›2](4"›0](B))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
538 ((eq rch ?›2](3e›0](B ) (visual-replace-right-1-char ?›2](3c›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
539 ((eq rch ?›2](4d›0](B) (visual-replace-right-1-char ?›2](4b›0](B))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
540 ((eq rch ?›2](3c›0](B ) (visual-replace-right-1-char ?›2](3d›0](B ))
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
541 ((eq rch ?›2](4b›0](B) (visual-replace-right-1-char ?›2](4c›0](B))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
542 (t (arabic-cut-connection)
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
543 (visual-insert-right-1-char ?›2](3-›0](B)))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
544 (setq arg (1- arg)))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
545
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
546 (defun arabic-toggle-input-char nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
547 "Toggle Arabic key input and ASCII key input."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
548 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
549 (if arabic-input-arabic-char
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
550 (setq arabic-input-arabic-char nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
551 arabic-mode-indicator " Arabic")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
552 (setq arabic-input-arabic-char t
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
553 arabic-mode-indicator " ›2](3=a:GJ›0](B"))
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
554 (redraw-modeline t))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
555
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
556 (defun arabic-newline (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
557 "Newline for arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
558 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
559 (arabic-insert-char ?\n arg))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
560
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
561 (defun arabic-open-line (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
562 "Openline for arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
563 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
564 (arabic-insert-char ?\n arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
565 (visual-backward-char arg))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
566
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
567 (defun arabic-delete-char (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
568 "Delete ARG (1st arg; integer) chars visually after visual point.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
569 After that, Arabic ligature is performed."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
570 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
571 (visual-delete-char arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
572 (arabic-make-connection))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
573
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
574 (defun arabic-backward-delete-char (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
575 "Delete ARG (1st arg; integer) chars visually before visual point.
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
576 After that, Arabic ligature is performed."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
577 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
578 (visual-backward-delete-char arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
579 (arabic-make-connection))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
580
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
581 (defun arabic-kill-region (beg end)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
582 "Kill-region command for arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
583 (interactive "r")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
584 (if (or (and buffer-read-only (not inhibit-read-only))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
585 (text-property-not-all beg end 'read-only nil))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
586 (visual-kill-region beg end)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
587 (visual-kill-region beg end)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
588 (arabic-make-connection)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
589
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
590 (defun arabic-kill-word (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
591 "Kill-word command for arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
592 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
593 (visual-kill-word arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
594 (arabic-make-connection))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
595
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
596 (defun arabic-backward-kill-word (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
597 "Backword-ill-word command for arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
598 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
599 (visual-backward-kill-word arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
600 (arabic-make-connection))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
601
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
602 (defun arabic-kill-line (&optional arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
603 "Kill-line command for arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
604 (interactive "*P")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
605 (visual-kill-line arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
606 (arabic-make-connection))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
607
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
608 (defun arabic-yank (&optional arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
609 "yank command for arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
610 (interactive "*P")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
611 (visual-yank arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
612 (let ((p1 (point)) (p2 (mark t)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
613 (arabic-make-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
614 (goto-char p2)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
615 (arabic-make-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
616 (goto-char p1)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
617 (set-marker (mark-marker) p2 (current-buffer))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
618 nil))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
619
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
620 (defun arabic-yank-pop (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
621 "yank-pop command for arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
622 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
623 (visual-yank-pop arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
624 (let ((p1 (point)) (p2 (mark t)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
625 (arabic-make-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
626 (goto-char p2)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
627 (arabic-make-connection)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
628 (goto-char p1)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
629 (set-marker (mark-marker) p2 (current-buffer))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
630 nil))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
631
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
632 (defun arabic-help nil
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
633 "Display keymap in Arabic-mode."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
634 (interactive)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
635 (let ((arabic-help-buffer (get-buffer-create "*Help*")))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
636 (set-buffer arabic-help-buffer)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
637 (erase-buffer)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
638 (insert arabic-help-string)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
639 (goto-char (point-min))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
640 (display-buffer (current-buffer))))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
641
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
642
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
643 ;; arabic LR commands
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
644
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
645 (defun arabic-delete-left-char (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
646 "Kill N (1st arg; integer) characters on the left of visual point."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
647 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
648 (if display-direction
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
649 (arabic-delete-char arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
650 (arabic-backward-delete-char arg)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
651
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
652 (defun arabic-delete-right-char (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
653 "Kill N (1st arg; integer) characters on the right of visual point."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
654 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
655 (if display-direction
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
656 (arabic-backward-delete-char arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
657 (arabic-delete-char arg)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
658
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
659 (defun arabic-kill-left-word (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
660 "Kill N (1st arg; integer) words on the left of visual point."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
661 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
662 (if display-direction
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
663 (arabic-kill-word arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
664 (arabic-backward-kill-word arg)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
665
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
666 (defun arabic-kill-right-word (arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
667 "Kill N (1st arg; integer) words on the right of visual point."
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
668 (interactive "*p")
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
669 (if display-direction
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
670 (arabic-backward-kill-word arg)
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
671 (arabic-kill-word arg)))
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
672
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
673 ;;;
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
674 (provide 'language/arabic-util)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 165
diff changeset
675
165
5a88923fcbfe Import from CVS: tag r20-3b9
cvs
parents:
diff changeset
676 ;;; arabic-util.el ends here