annotate man/mule/R2L.texi @ 132:757f1c4d15f7 xemacs-20-1

Added tag xemacs-20-1p4 for changeset 869e1851236b
author cvs
date Mon, 13 Aug 2007 09:29:09 +0200
parents 131b0175ea99
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1 \input texinfo @c -*-texinfo-*-
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
2 @setfilename ../info/R2L
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
3 @settitle Right-to-left writing
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
4
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
5 @titlepage
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
6 @sp 6
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
7 @center @titlefont{Right-to-left writing}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
8 @sp 4
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
9 @center Version 2.0
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
10 @sp 5
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
11 @center Ken'ichi HANDA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
12 @center handa@@etl.go.jp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
13 @page
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
14
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
15 @end titlepage
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
16
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
17 @comment ============================================================
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
18 @node Top, , , (mule)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
19 @section Right-to-left writing
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
20
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
21 This document describes how Mule handles a text written from right to
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
22 left.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
23
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
24 @menu
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
25 * Right-to-left Character Set::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
26 * Direction of Buffer::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
27 * Cursor Motion::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
28 * LR Commands::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
29 @ignore
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
30 * Double cursor::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
31 * Highlighing::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
32 * Visual inputting::
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
33 @end ignore
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
34 @end menu
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
35
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
36 @comment ============================================================
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
37 @node Right-to-left Character Set, Direction of Buffer, , Top
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
38 @section Right-to-left Character Set
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
39
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
40 In Mule, each character set has the attribute @dfn{direction}. The
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
41 value is either 0 (l2r, left-to-right) or 1 (r2l, right-to-left). For
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
42 the moment, Mule has four r2l character sets, namely, Hebrew
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
43 (ISO8859-8), ASCII-r2l (private) Arabic1 (private) and Arabic2
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
44 (private). ASCII-r2l is for providing r2l space and punctuation
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
45 characters to Hebrew. Consecutive r2l characters are shown from right
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
46 to left on the screen.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
47
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
48 Hereafter, we denote r2l characters by capital letters and l2r
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
49 characters by lowercase letters in strings. Punctuation marks (e.g.,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
50 period) mean normal ASCII characters. For r2l space and punctuations,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
51 we use the letter @samp{_} (underscore).
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
52
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
53 @comment ============================================================
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
54 @node Direction of Buffer, Cursor Motion, Right-to-left character set, Top
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
55 @section Direction of buffer
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
56
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
57 Each buffer also has the attribute @dfn{direction} (buffer local
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
58 variable @code{display-direction}). By default, the value is @code{nil}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
59 (means l2r direction). Provided that a buffer contains:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
60
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
61 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
62 this is a DESREVER word.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
63 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
64
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
65 If @code{display-direction} is @code{nil} (this is the default), what
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
66 you see on your screen is:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
67
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
68 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
69 +---------------------------------+
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
70 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
71 | |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
72 +---------------------------------+
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
73 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
74
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
75 but, if the direction is non-@code{nil}, what you see is:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
76
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
77 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
78 +---------------------------------+
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
79 | word.DESREVERthis is a |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
80 | |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
81 +---------------------------------+
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
82 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
83
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
84 If you are in visual-mode, the value of @code{display-direction} is
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
85 reflected in the mode-line. The string @samp{L2R} means
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
86 @code{display-direction} is @code{nil}; @samp{R2L} means non-@code{nil}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
87 In visual-mode, you can set @code{display-direction} to @code{nil} by
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
88 typing @kbd{C-c <}, and to @code{t} (this means non-@code{nil}) by
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
89 typing @kbd{C-c >}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
90
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
91 If you read a file that has the extension @file{.l2r}, the buffer
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
92 automatically turns into visual-mode and @code{display-direction} is set
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
93 to @code{nil}. Likewise, if a file has the extension @file{.r2l}, the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
94 buffer automatically goes in visual-mode and @code{display-direction} is
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
95 set to @code{t}.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
96
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
97 @comment ============================================================
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
98 @node Cursor Motion, LR commands, Direction of Buffer, Top
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
99 @section Cursor Motion
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
100
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
101 If you are not in visual-mode and type @kbd{C-f} (or @kbd{M-x
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
102 forward-char}, the cursor moves as follows:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
103
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
104 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
105 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
106 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
107 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
108 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
109 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
110 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
111 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
112 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
113 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
114 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
115 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
116 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
117 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
118 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
119 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
120 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
121 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
122 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
123 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
124 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
125 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
126 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
127 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
128 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
129 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
130 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
131 |this is a DESREVER word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
132 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
133 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
134
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
135 This is rather complicated and misleading. To avoid confusions, the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
136 following cursor motion commands are prepared in visual-mode to handle
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
137 bi-directional texts easily. All these commands accept an additional
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
138 prefix numeric argument.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
139
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
140 @table @asis
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
141 @item @kbd{C-f} or @kbd{M-x visual-forward-char}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
142 Move the cursor visually forward in characters.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
143
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
144 @item @kbd{C-b} or @kbd{M-x visual-backward-char}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
145 Move the cursor visually backward in characters.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
146
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
147 @item @kbd{C-p}, @kbd{@key{UP}} or @kbd{M-x visual-previous-line}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
148 Move the cursor up in lines.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
149
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
150 @item @kbd{C-n}, @kbd{@key{DOWN}} or @kbd{M-x visual-next-line}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
151 Move the cursor down in lines.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
152
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
153 @item @kbd{C-a} or @kbd{M-x visual-beginning-of-line}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
154 Move the cursor to the visual beginning of the current line.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
155
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
156 @item @kbd{M-f} or @kbd{M-x visual-forward-word}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
157 Move the cursor visually forward in words.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
158
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
159 @item @kbd{M-b} or @kbd{M-x visual-backward-word}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
160 Move the cursor visually backward in words.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
161
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
162 @item @kbd{M-<}, @kbd{HOME} or @kbd{M-x visual-beginning-of-buffer}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
163 Move the cursor to the visual beginning of the current buffer.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
164
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
165 @item @kbd{M->}, @kbd{END} or @kbd{M-x visual-end-of-buffer}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
166 Move the cursor to the visual end of the current buffer.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
167 @end table
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
168
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
169 Note that ordinary cursor motion commands (@code{forward-char},
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
170 @code{backward-char}, etc.) behave according to the @dfn{logical order}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
171 of the text, whilst the above commands behave according to the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
172 @dfn{visual order}. Compare the difference of the two @kbd{C-f}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
173 commands. (You can exit visual-mode by typing @kbd{C-c C-c}.)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
174
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
175 Some of you may be confused by the words @dfn{forward} and
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
176 @dfn{backward}. Here is a summary:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
177
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
178 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
179 display-direction nil non-nil
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
180 ------------------------------------------------
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
181 forward right left
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
182 backward left right
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
183 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
184
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
185 @comment ============================================================
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
186 @node LR Commands, , Cursor Motion, Top
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
187 @section LR Commands
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
188
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
189 If you have been using Emacs or Mule for a long time, it is possible
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
190 that @kbd{C-b} and @dfn{move to left} are so strongly associated in your
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
191 mind that you want to move the cursor to left by @kbd{C-b} no matter how
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
192 @code{display-direction} is set. Likewise, you may want to move the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
193 cursor to the right, to the left-most column and to the right-most
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
194 column by @kbd{C-f}, @kbd{C-a} and @kbd{C-e}, respectively.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
195
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
196 In such cases, include the following line in your @file{~/.emacs}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
197 file:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
198
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
199 @lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
200 (setq visual-use-lr-commands t)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
201 @end lisp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
202
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
203 This lisp command enables so called @dfn{LR commands}. LR commands
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
204 act according to the absolute screen direction (such as @dfn{left} or
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
205 @dfn{right}) rather than the relative direction (@dfn{forward} or
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
206 @dfn{backward}).
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
207
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
208 @table @asis
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
209 @item @kbd{C-b}, @kbd{@key{LEFT}} or @kbd{M-x visual-move-to-left-char}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
210 Move the cursor to the left in characters.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
211
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
212 @item @kbd{C-f}, @kbd{@key{RIGHT}} or @kbd{M-x visual-move-to-right-char}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
213 Move the cursor to the right in characters.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
214
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
215 @item @kbd{M-b}, @kbd{@key{M-LEFT}} or @kbd{M-x visual-move-to-left-word}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
216 Move the cursor to the left in words.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
217
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
218 @item @kbd{M-f}, @kbd{@key{M-RIGHT}} or @kbd{M-x visual-move-to-right-word}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
219 Move the cursor to the right in words.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
220
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
221 @item @kbd{C-a} or @kbd{M-x visual-left-end-of-line}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
222 Move the cursor to the left-most column of the current line.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
223
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
224 @item @kbd{C-e} or @kbd{M-x visual-right-end-of-line}
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
225 Move the cursor to the right-most column of the current line.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
226 @end table
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
227
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
228 As a matter of fact, the four keys, @key{LEFT}, @key{RIGHT},
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
229 @key{M-LEFT} and @key{M-RIGHT} are active even though your
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
230 @file{~/.emacs} file does not contain the @code{setq} line above. So if
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
231 you are confused, use the arrow keys.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
232
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
233 @ignore
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
234
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
235 @node Double cursor, Highlighing, Direction of buffer, Top
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
236 @section Double cursor
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
237
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
238 If the value of 'r2l-double-cursor' is non-nil, when POINT
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
239 is in between r2l char and l2r (normal) char, two cursor are
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
240 displayed to denote insertion points for both types of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
241 character. For instance, in the above example, when you
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
242 move POINT forward one by one, the cursor changes as
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
243 follows:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
244
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
245 @example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
246 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
247 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
248 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
249 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
250 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
251 ^ ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
252 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
253 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
254 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
255 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
256 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
257 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
258 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
259 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
260 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
261 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
262 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
263 ^ ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
264 |this is a WERBEH word. |
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
265 ^
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
266 @end example
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
267
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
268 @node Highlighing, Visual inputting, Double cursor, Top
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
269 @section Highlighing characters of reverse direction
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
270
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
271 If the value of 'highlight-reverse-direction' is non-nil
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
272 (default), a character whose direction is different from
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
273 that of the current buffer is highlighted by gray-color (or
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
274 background mesh).
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
275
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
276 @node Visual inputting, , Highlighing, Top
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
277 @section Visual inputting
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
278
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
279 As mentioned above, cursor motion in r2l text is rather complicated.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
280 Further, even with the double cursor function, you may need some time
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
281 to learn inserting/deleting characters in an r2l text.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
282
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
283 To faciliate the manipulation of r2l texts, quail provides a set of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
284 functions which make cursor motion and insertion/deletion behave as
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
285 you expect.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
286
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
287 visually-forward-char
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
288 Function: Move cursor visually forward by ARG chars.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
289
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
290 visually-backward-char
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
291 Function: Move cursor visually backward by ARG chars.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
292
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
293 visually-beginning-of-line
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
294 Function: Move cursor to the visually beginning of line.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
295
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
296 visually-insert-char
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
297 Function: With argument CH, call VISUALLY-INSERT-CHAR ARG times.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
298
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
299 visually-backward-delete-char
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
300 Function: Delete ARG chars visually before cursor.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
301
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
302 visually-delete-char
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
303 Function: Delete ARG chars under cursor.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
304
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
305 These functions behave as if the whole buffer were filled with
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
306 characters of same direction: for example, when the buffer direction
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
307 is l2r, visually-forward-char moves the cursor to the right (or left,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
308 if the buffer direction is r2l) step by step; visually-insert-char
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
309 puts the typed character just under the cursor and moves the cursor to
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
310 the right (left) by one column; visually-backward-delete-char removes
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
311 the character left (right) to the cursor, etc.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
312
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
313 In quail/hebrew.el these visual functions are called via appropriate
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
314 quail cursor motion functions. As quail cursor motion functions are
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
315 bound to appropriate keys, you will not be puzzled by the complicated
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
316 cursor behaviours as long as you use the hebrew package of quail-mode.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
317
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
318 @end ignore
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
319
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
320 @contents
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
321 @bye