annotate man/picture.texi @ 62868:3114c221f6b4

(flyspell-version): Function deleted. (flyspell-auto-correct-previous-hook): Doc fix. (flyspell-emacs, flyspell-use-local-map): Vars moved up. (flyspell-default-delayed-commands): add backward-delete-char-untabify. (flyspell-abbrev-p): Default to nil. (flyspell-use-global-abbrev-table-p): Doc fix. (flyspell-large-region): Allow nil as value. (flyspell-use-meta-tab, flyspell-auto-correct-binding): New variables. (mail-mode-flyspell-verify): More robust handling of `mail-header-separator'. More efficient signature detection. Allow for regexp metacharacters in message-header-separator. Adding `To' not to be checked in mail-mode-flyspell-verify. (flyspell-prog-mode): Run flyspell-prog-mode-hook. (flyspell-mouse-map, flyspell-mode-map): Bind C-. and C-, . Bind M-TAB only if flyspell-use-meta-tab. Bind flyspell-auto-correct-binding. (flyspell-mode-on): Bind flyspell-mouse-map and flyspell-mode-map. (flyspell-mode): Doc fix. (flyspell-accept-buffer-local-defs): Preserve current buffer. (flyspell-word-cache-result): New var, always local. (flyspell-check-pre-word-p): Doc fix. (flyspell-check-changed-word-p): Handle spc like newline. (flyspell-post-command-hook): Set flyspell-word-cache-result. (flyspell-word-search-backward, flyspell-word-search-forward): New functions. (flyspell-word): Return t if nothing to check. When parsing TeX code, check for after } or \. Use flyspell-word-search-backward to find previous word. Return nil if duplicated word. For word already checked, return same value as last time. Set flyspell-word-cache-result after checking. Don't clobber the return value. (flyspell-get-word): Major rewrite. (flyspell-external-point-words): New locals pword, pcount. Fix size used in progress message. Find the proper corresponding word in flyspell-large-region-buffer. (flyspell-region): Check for flyspell-large-region = nil. (flyspell-highlight-incorrect-region): Clean up overlays in region. (flyspell-auto-correct-word): Check that WORD is a cons. (flyspell-correct-word): Likewise. (flyspell-auto-correct-previous-word): Narrow down to what's on the screen, and recenter overlays at the end of the next word.
author Richard M. Stallman <rms@gnu.org>
date Sun, 29 May 2005 14:27:15 +0000
parents 29356dc048ef
children 3723093a21fd 13796b0653c7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
1 @c This is part of the Emacs manual.
Dave Love <fx@gnu.org>
parents:
diff changeset
2 @c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
Dave Love <fx@gnu.org>
parents:
diff changeset
3 @c See file emacs.texi for copying conditions.
Dave Love <fx@gnu.org>
parents:
diff changeset
4 @node Picture, Sending Mail, Abbrevs, Top
Dave Love <fx@gnu.org>
parents:
diff changeset
5 @chapter Editing Pictures
Dave Love <fx@gnu.org>
parents:
diff changeset
6 @cindex pictures
Dave Love <fx@gnu.org>
parents:
diff changeset
7 @cindex making pictures out of text characters
Dave Love <fx@gnu.org>
parents:
diff changeset
8 @findex edit-picture
Dave Love <fx@gnu.org>
parents:
diff changeset
9
Dave Love <fx@gnu.org>
parents:
diff changeset
10 To edit a picture made out of text characters (for example, a picture
Dave Love <fx@gnu.org>
parents:
diff changeset
11 of the division of a register into fields, as a comment in a program),
Dave Love <fx@gnu.org>
parents:
diff changeset
12 use the command @kbd{M-x edit-picture} to enter Picture mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
13
Dave Love <fx@gnu.org>
parents:
diff changeset
14 In Picture mode, editing is based on the @dfn{quarter-plane} model of
Dave Love <fx@gnu.org>
parents:
diff changeset
15 text, according to which the text characters lie studded on an area that
Dave Love <fx@gnu.org>
parents:
diff changeset
16 stretches infinitely far to the right and downward. The concept of the end
Dave Love <fx@gnu.org>
parents:
diff changeset
17 of a line does not exist in this model; the most you can say is where the
Dave Love <fx@gnu.org>
parents:
diff changeset
18 last nonblank character on the line is found.
Dave Love <fx@gnu.org>
parents:
diff changeset
19
Dave Love <fx@gnu.org>
parents:
diff changeset
20 Of course, Emacs really always considers text as a sequence of
Dave Love <fx@gnu.org>
parents:
diff changeset
21 characters, and lines really do have ends. But Picture mode replaces
Dave Love <fx@gnu.org>
parents:
diff changeset
22 the most frequently-used commands with variants that simulate the
Dave Love <fx@gnu.org>
parents:
diff changeset
23 quarter-plane model of text. They do this by inserting spaces or by
Dave Love <fx@gnu.org>
parents:
diff changeset
24 converting tabs to spaces.
Dave Love <fx@gnu.org>
parents:
diff changeset
25
Dave Love <fx@gnu.org>
parents:
diff changeset
26 Most of the basic editing commands of Emacs are redefined by Picture mode
Dave Love <fx@gnu.org>
parents:
diff changeset
27 to do essentially the same thing but in a quarter-plane way. In addition,
Dave Love <fx@gnu.org>
parents:
diff changeset
28 Picture mode defines various keys starting with the @kbd{C-c} prefix to
Dave Love <fx@gnu.org>
parents:
diff changeset
29 run special picture editing commands.
Dave Love <fx@gnu.org>
parents:
diff changeset
30
Dave Love <fx@gnu.org>
parents:
diff changeset
31 One of these keys, @kbd{C-c C-c}, is pretty important. Often a
Dave Love <fx@gnu.org>
parents:
diff changeset
32 picture is part of a larger file that is usually edited in some other
Dave Love <fx@gnu.org>
parents:
diff changeset
33 major mode. @kbd{M-x edit-picture} records the name of the previous
Dave Love <fx@gnu.org>
parents:
diff changeset
34 major mode so you can use the @kbd{C-c C-c} command
Dave Love <fx@gnu.org>
parents:
diff changeset
35 (@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c}
Dave Love <fx@gnu.org>
parents:
diff changeset
36 also deletes spaces from the ends of lines, unless given a numeric
Dave Love <fx@gnu.org>
parents:
diff changeset
37 argument.
Dave Love <fx@gnu.org>
parents:
diff changeset
38
Dave Love <fx@gnu.org>
parents:
diff changeset
39 The special commands of Picture mode all work in other modes (provided
Dave Love <fx@gnu.org>
parents:
diff changeset
40 the @file{picture} library is loaded), but are not bound to keys except
Dave Love <fx@gnu.org>
parents:
diff changeset
41 in Picture mode. The descriptions below talk of moving ``one column''
Dave Love <fx@gnu.org>
parents:
diff changeset
42 and so on, but all the picture mode commands handle numeric arguments as
Dave Love <fx@gnu.org>
parents:
diff changeset
43 their normal equivalents do.
Dave Love <fx@gnu.org>
parents:
diff changeset
44
Dave Love <fx@gnu.org>
parents:
diff changeset
45 @vindex picture-mode-hook
Dave Love <fx@gnu.org>
parents:
diff changeset
46 Turning on Picture mode runs the hook @code{picture-mode-hook}
59797
55b6b84bb3c1 (Picture): Mention artist.el.
Richard M. Stallman <rms@gnu.org>
parents: 52401
diff changeset
47 (@pxref{Hooks}). Additional extensions to Picture mode can be found
55b6b84bb3c1 (Picture): Mention artist.el.
Richard M. Stallman <rms@gnu.org>
parents: 52401
diff changeset
48 in @file{artist.el}.
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
49
Dave Love <fx@gnu.org>
parents:
diff changeset
50 @menu
Dave Love <fx@gnu.org>
parents:
diff changeset
51 * Basic Picture:: Basic concepts and simple commands of Picture Mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
52 * Insert in Picture:: Controlling direction of cursor motion
Dave Love <fx@gnu.org>
parents:
diff changeset
53 after "self-inserting" characters.
Dave Love <fx@gnu.org>
parents:
diff changeset
54 * Tabs in Picture:: Various features for tab stops and indentation.
Dave Love <fx@gnu.org>
parents:
diff changeset
55 * Rectangles in Picture:: Clearing and superimposing rectangles.
Dave Love <fx@gnu.org>
parents:
diff changeset
56 @end menu
Dave Love <fx@gnu.org>
parents:
diff changeset
57
Dave Love <fx@gnu.org>
parents:
diff changeset
58 @node Basic Picture, Insert in Picture, Picture, Picture
Dave Love <fx@gnu.org>
parents:
diff changeset
59 @section Basic Editing in Picture Mode
Dave Love <fx@gnu.org>
parents:
diff changeset
60
Dave Love <fx@gnu.org>
parents:
diff changeset
61 @findex picture-forward-column
Dave Love <fx@gnu.org>
parents:
diff changeset
62 @findex picture-backward-column
Dave Love <fx@gnu.org>
parents:
diff changeset
63 @findex picture-move-down
Dave Love <fx@gnu.org>
parents:
diff changeset
64 @findex picture-move-up
Dave Love <fx@gnu.org>
parents:
diff changeset
65 @cindex editing in Picture mode
Dave Love <fx@gnu.org>
parents:
diff changeset
66
Dave Love <fx@gnu.org>
parents:
diff changeset
67 Most keys do the same thing in Picture mode that they usually do, but
Dave Love <fx@gnu.org>
parents:
diff changeset
68 do it in a quarter-plane style. For example, @kbd{C-f} is rebound to
Dave Love <fx@gnu.org>
parents:
diff changeset
69 run @code{picture-forward-column}, a command which moves point one
Dave Love <fx@gnu.org>
parents:
diff changeset
70 column to the right, inserting a space if necessary so that the actual
Dave Love <fx@gnu.org>
parents:
diff changeset
71 end of the line makes no difference. @kbd{C-b} is rebound to run
Dave Love <fx@gnu.org>
parents:
diff changeset
72 @code{picture-backward-column}, which always moves point left one
Dave Love <fx@gnu.org>
parents:
diff changeset
73 column, converting a tab to multiple spaces if necessary. @kbd{C-n} and
Dave Love <fx@gnu.org>
parents:
diff changeset
74 @kbd{C-p} are rebound to run @code{picture-move-down} and
Dave Love <fx@gnu.org>
parents:
diff changeset
75 @code{picture-move-up}, which can either insert spaces or convert tabs
Dave Love <fx@gnu.org>
parents:
diff changeset
76 as necessary to make sure that point stays in exactly the same column.
Dave Love <fx@gnu.org>
parents:
diff changeset
77 @kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
Dave Love <fx@gnu.org>
parents:
diff changeset
78 nonblank character on the line. There is no need to change @kbd{C-a},
Dave Love <fx@gnu.org>
parents:
diff changeset
79 as the choice of screen model does not affect beginnings of
Dave Love <fx@gnu.org>
parents:
diff changeset
80 lines.
Dave Love <fx@gnu.org>
parents:
diff changeset
81
Dave Love <fx@gnu.org>
parents:
diff changeset
82 @findex picture-newline
Dave Love <fx@gnu.org>
parents:
diff changeset
83 Insertion of text is adapted to the quarter-plane screen model through
Dave Love <fx@gnu.org>
parents:
diff changeset
84 the use of Overwrite mode (@pxref{Minor Modes}). Self-inserting characters
Dave Love <fx@gnu.org>
parents:
diff changeset
85 replace existing text, column by column, rather than pushing existing text
Dave Love <fx@gnu.org>
parents:
diff changeset
86 to the right. @key{RET} runs @code{picture-newline}, which just moves to
Dave Love <fx@gnu.org>
parents:
diff changeset
87 the beginning of the following line so that new text will replace that
Dave Love <fx@gnu.org>
parents:
diff changeset
88 line.
Dave Love <fx@gnu.org>
parents:
diff changeset
89
Dave Love <fx@gnu.org>
parents:
diff changeset
90 @findex picture-backward-clear-column
Dave Love <fx@gnu.org>
parents:
diff changeset
91 @findex picture-clear-column
Dave Love <fx@gnu.org>
parents:
diff changeset
92 @findex picture-clear-line
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
93 In Picture mode, the commands that normally delete or kill text,
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
94 instead erase text (replacing it with spaces). @key{DEL}
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
95 (@code{picture-backward-clear-column}) replaces the preceding
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
96 character with a space rather than removing it; this moves point
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
97 backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
98 character or characters with spaces, but does not move point. (If you
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
99 want to clear characters to spaces and move forward over them, use
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
100 @key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
101 contents of lines, but does not delete the newlines from the buffer.
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
102
Dave Love <fx@gnu.org>
parents:
diff changeset
103 @findex picture-open-line
Dave Love <fx@gnu.org>
parents:
diff changeset
104 To do actual insertion, you must use special commands. @kbd{C-o}
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
105 (@code{picture-open-line}) creates a blank line after the current
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
106 line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
107 sense in Picture mode, so it is not changed. @kbd{C-j}
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
108 (@code{picture-duplicate-line}) inserts another line with the same
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
109 contents below the current line.
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
110
Dave Love <fx@gnu.org>
parents:
diff changeset
111 @kindex C-c C-d @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
112 To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
Dave Love <fx@gnu.org>
parents:
diff changeset
113 (which is defined as @code{delete-char}, as @kbd{C-d} is in other
Dave Love <fx@gnu.org>
parents:
diff changeset
114 modes), or one of the picture rectangle commands (@pxref{Rectangles in
Dave Love <fx@gnu.org>
parents:
diff changeset
115 Picture}).
Dave Love <fx@gnu.org>
parents:
diff changeset
116
Dave Love <fx@gnu.org>
parents:
diff changeset
117 @node Insert in Picture, Tabs in Picture, Basic Picture, Picture
Dave Love <fx@gnu.org>
parents:
diff changeset
118 @section Controlling Motion after Insert
Dave Love <fx@gnu.org>
parents:
diff changeset
119
Dave Love <fx@gnu.org>
parents:
diff changeset
120 @findex picture-movement-up
Dave Love <fx@gnu.org>
parents:
diff changeset
121 @findex picture-movement-down
Dave Love <fx@gnu.org>
parents:
diff changeset
122 @findex picture-movement-left
Dave Love <fx@gnu.org>
parents:
diff changeset
123 @findex picture-movement-right
Dave Love <fx@gnu.org>
parents:
diff changeset
124 @findex picture-movement-nw
Dave Love <fx@gnu.org>
parents:
diff changeset
125 @findex picture-movement-ne
Dave Love <fx@gnu.org>
parents:
diff changeset
126 @findex picture-movement-sw
Dave Love <fx@gnu.org>
parents:
diff changeset
127 @findex picture-movement-se
Dave Love <fx@gnu.org>
parents:
diff changeset
128 @kindex C-c < @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
129 @kindex C-c > @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
130 @kindex C-c ^ @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
131 @kindex C-c . @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
132 @kindex C-c ` @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
133 @kindex C-c ' @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
134 @kindex C-c / @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
135 @kindex C-c \ @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
136 Since ``self-inserting'' characters in Picture mode overwrite and move
Dave Love <fx@gnu.org>
parents:
diff changeset
137 point, there is no essential restriction on how point should be moved.
Dave Love <fx@gnu.org>
parents:
diff changeset
138 Normally point moves right, but you can specify any of the eight
Dave Love <fx@gnu.org>
parents:
diff changeset
139 orthogonal or diagonal directions for motion after a ``self-inserting''
Dave Love <fx@gnu.org>
parents:
diff changeset
140 character. This is useful for drawing lines in the buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
141
Dave Love <fx@gnu.org>
parents:
diff changeset
142 @table @kbd
Dave Love <fx@gnu.org>
parents:
diff changeset
143 @item C-c <
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
144 @itemx C-c @key{LEFT}
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
145 Move left after insertion (@code{picture-movement-left}).
Dave Love <fx@gnu.org>
parents:
diff changeset
146 @item C-c >
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
147 @itemx C-c @key{RIGHT}
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
148 Move right after insertion (@code{picture-movement-right}).
Dave Love <fx@gnu.org>
parents:
diff changeset
149 @item C-c ^
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
150 @itemx C-c @key{UP}
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
151 Move up after insertion (@code{picture-movement-up}).
Dave Love <fx@gnu.org>
parents:
diff changeset
152 @item C-c .
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
153 @itemx C-c @key{DOWN}
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
154 Move down after insertion (@code{picture-movement-down}).
Dave Love <fx@gnu.org>
parents:
diff changeset
155 @item C-c `
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
156 @itemx C-c @key{HOME}
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
157 Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
Dave Love <fx@gnu.org>
parents:
diff changeset
158 @item C-c '
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
159 @itemx C-c @key{PAGEUP}
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
160 Move up and right (``northeast'') after insertion
Dave Love <fx@gnu.org>
parents:
diff changeset
161 (@code{picture-movement-ne}).
Dave Love <fx@gnu.org>
parents:
diff changeset
162 @item C-c /
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
163 @itemx C-c @key{END}
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
164 Move down and left (``southwest'') after insertion
Dave Love <fx@gnu.org>
parents:
diff changeset
165 @*(@code{picture-movement-sw}).
Dave Love <fx@gnu.org>
parents:
diff changeset
166 @item C-c \
60858
29356dc048ef (Insert in Picture): Document C-c arrow combos.
Richard M. Stallman <rms@gnu.org>
parents: 59797
diff changeset
167 @itemx C-c @key{PAGEDOWN}
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
168 Move down and right (``southeast'') after insertion
Dave Love <fx@gnu.org>
parents:
diff changeset
169 @*(@code{picture-movement-se}).
Dave Love <fx@gnu.org>
parents:
diff changeset
170 @end table
Dave Love <fx@gnu.org>
parents:
diff changeset
171
Dave Love <fx@gnu.org>
parents:
diff changeset
172 @kindex C-c C-f @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
173 @kindex C-c C-b @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
174 @findex picture-motion
Dave Love <fx@gnu.org>
parents:
diff changeset
175 @findex picture-motion-reverse
Dave Love <fx@gnu.org>
parents:
diff changeset
176 Two motion commands move based on the current Picture insertion
Dave Love <fx@gnu.org>
parents:
diff changeset
177 direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
Dave Love <fx@gnu.org>
parents:
diff changeset
178 same direction as motion after ``insertion'' currently does, while @kbd{C-c
Dave Love <fx@gnu.org>
parents:
diff changeset
179 C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
Dave Love <fx@gnu.org>
parents:
diff changeset
180
Dave Love <fx@gnu.org>
parents:
diff changeset
181 @node Tabs in Picture, Rectangles in Picture, Insert in Picture, Picture
Dave Love <fx@gnu.org>
parents:
diff changeset
182 @section Picture Mode Tabs
Dave Love <fx@gnu.org>
parents:
diff changeset
183
Dave Love <fx@gnu.org>
parents:
diff changeset
184 @kindex M-TAB @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
185 @findex picture-tab-search
Dave Love <fx@gnu.org>
parents:
diff changeset
186 @vindex picture-tab-chars
Dave Love <fx@gnu.org>
parents:
diff changeset
187 Two kinds of tab-like action are provided in Picture mode. Use
Dave Love <fx@gnu.org>
parents:
diff changeset
188 @kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
Dave Love <fx@gnu.org>
parents:
diff changeset
189 With no argument, it moves to a point underneath the next
Dave Love <fx@gnu.org>
parents:
diff changeset
190 ``interesting'' character that follows whitespace in the previous
Dave Love <fx@gnu.org>
parents:
diff changeset
191 nonblank line. ``Next'' here means ``appearing at a horizontal position
Dave Love <fx@gnu.org>
parents:
diff changeset
192 greater than the one point starts out at.'' With an argument, as in
Dave Love <fx@gnu.org>
parents:
diff changeset
193 @kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
Dave Love <fx@gnu.org>
parents:
diff changeset
194 character in the current line. @kbd{M-@key{TAB}} does not change the
Dave Love <fx@gnu.org>
parents:
diff changeset
195 text; it only moves point. ``Interesting'' characters are defined by
Dave Love <fx@gnu.org>
parents:
diff changeset
196 the variable @code{picture-tab-chars}, which should define a set of
Dave Love <fx@gnu.org>
parents:
diff changeset
197 characters. The syntax for this variable is like the syntax used inside
Dave Love <fx@gnu.org>
parents:
diff changeset
198 of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
Dave Love <fx@gnu.org>
parents:
diff changeset
199 and the @samp{]}. Its default value is @code{"!-~"}.
Dave Love <fx@gnu.org>
parents:
diff changeset
200
Dave Love <fx@gnu.org>
parents:
diff changeset
201 @findex picture-tab
Dave Love <fx@gnu.org>
parents:
diff changeset
202 @key{TAB} itself runs @code{picture-tab}, which operates based on the
Dave Love <fx@gnu.org>
parents:
diff changeset
203 current tab stop settings; it is the Picture mode equivalent of
Dave Love <fx@gnu.org>
parents:
diff changeset
204 @code{tab-to-tab-stop}. Normally it just moves point, but with a numeric
Dave Love <fx@gnu.org>
parents:
diff changeset
205 argument it clears the text that it moves over.
Dave Love <fx@gnu.org>
parents:
diff changeset
206
Dave Love <fx@gnu.org>
parents:
diff changeset
207 @kindex C-c TAB @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
208 @findex picture-set-tab-stops
Dave Love <fx@gnu.org>
parents:
diff changeset
209 The context-based and tab-stop-based forms of tabbing are brought
Dave Love <fx@gnu.org>
parents:
diff changeset
210 together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
Dave Love <fx@gnu.org>
parents:
diff changeset
211 This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
Dave Love <fx@gnu.org>
parents:
diff changeset
212 would consider significant in the current line. The use of this command,
Dave Love <fx@gnu.org>
parents:
diff changeset
213 together with @key{TAB}, can get the effect of context-based tabbing. But
Dave Love <fx@gnu.org>
parents:
diff changeset
214 @kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
Dave Love <fx@gnu.org>
parents:
diff changeset
215
Dave Love <fx@gnu.org>
parents:
diff changeset
216 It may be convenient to prevent use of actual tab characters in
Dave Love <fx@gnu.org>
parents:
diff changeset
217 pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing
Dave Love <fx@gnu.org>
parents:
diff changeset
218 up the picture. You can do this by setting the variable
Dave Love <fx@gnu.org>
parents:
diff changeset
219 @code{indent-tabs-mode} to @code{nil}. @xref{Just Spaces}.
Dave Love <fx@gnu.org>
parents:
diff changeset
220
Dave Love <fx@gnu.org>
parents:
diff changeset
221 @node Rectangles in Picture,, Tabs in Picture, Picture
Dave Love <fx@gnu.org>
parents:
diff changeset
222 @section Picture Mode Rectangle Commands
Dave Love <fx@gnu.org>
parents:
diff changeset
223 @cindex rectangles and Picture mode
Dave Love <fx@gnu.org>
parents:
diff changeset
224 @cindex Picture mode and rectangles
Dave Love <fx@gnu.org>
parents:
diff changeset
225
Dave Love <fx@gnu.org>
parents:
diff changeset
226 Picture mode defines commands for working on rectangular pieces of the
Dave Love <fx@gnu.org>
parents:
diff changeset
227 text in ways that fit with the quarter-plane model. The standard rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
228 commands may also be useful (@pxref{Rectangles}).
Dave Love <fx@gnu.org>
parents:
diff changeset
229
Dave Love <fx@gnu.org>
parents:
diff changeset
230 @table @kbd
Dave Love <fx@gnu.org>
parents:
diff changeset
231 @item C-c C-k
Dave Love <fx@gnu.org>
parents:
diff changeset
232 Clear out the region-rectangle with spaces
Dave Love <fx@gnu.org>
parents:
diff changeset
233 (@code{picture-clear-rectangle}). With argument, delete the text.
Dave Love <fx@gnu.org>
parents:
diff changeset
234 @item C-c C-w @var{r}
38461
23f63206a867 Proofreading fixes from Chris Green <chris_e_green@yahoo.com>.
Eli Zaretskii <eliz@gnu.org>
parents: 25829
diff changeset
235 Similar, but save rectangle contents in register @var{r} first
25829
Dave Love <fx@gnu.org>
parents:
diff changeset
236 (@code{picture-clear-rectangle-to-register}).
Dave Love <fx@gnu.org>
parents:
diff changeset
237 @item C-c C-y
Dave Love <fx@gnu.org>
parents:
diff changeset
238 Copy last killed rectangle into the buffer by overwriting, with upper
Dave Love <fx@gnu.org>
parents:
diff changeset
239 left corner at point (@code{picture-yank-rectangle}). With argument,
Dave Love <fx@gnu.org>
parents:
diff changeset
240 insert instead.
Dave Love <fx@gnu.org>
parents:
diff changeset
241 @item C-c C-x @var{r}
Dave Love <fx@gnu.org>
parents:
diff changeset
242 Similar, but use the rectangle in register @var{r}
Dave Love <fx@gnu.org>
parents:
diff changeset
243 (@code{picture-yank-rectangle-from-register}).
Dave Love <fx@gnu.org>
parents:
diff changeset
244 @end table
Dave Love <fx@gnu.org>
parents:
diff changeset
245
Dave Love <fx@gnu.org>
parents:
diff changeset
246 @kindex C-c C-k @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
247 @kindex C-c C-w @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
248 @findex picture-clear-rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
249 @findex picture-clear-rectangle-to-register
Dave Love <fx@gnu.org>
parents:
diff changeset
250 The picture rectangle commands @kbd{C-c C-k}
Dave Love <fx@gnu.org>
parents:
diff changeset
251 (@code{picture-clear-rectangle}) and @kbd{C-c C-w}
Dave Love <fx@gnu.org>
parents:
diff changeset
252 (@code{picture-clear-rectangle-to-register}) differ from the standard
Dave Love <fx@gnu.org>
parents:
diff changeset
253 rectangle commands in that they normally clear the rectangle instead of
Dave Love <fx@gnu.org>
parents:
diff changeset
254 deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
Dave Love <fx@gnu.org>
parents:
diff changeset
255 mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
256
Dave Love <fx@gnu.org>
parents:
diff changeset
257 However, deletion of rectangles can be useful in Picture mode, so
Dave Love <fx@gnu.org>
parents:
diff changeset
258 these commands delete the rectangle if given a numeric argument.
Dave Love <fx@gnu.org>
parents:
diff changeset
259 @kbd{C-c C-k} either with or without a numeric argument saves the
Dave Love <fx@gnu.org>
parents:
diff changeset
260 rectangle for @kbd{C-c C-y}.
Dave Love <fx@gnu.org>
parents:
diff changeset
261
Dave Love <fx@gnu.org>
parents:
diff changeset
262 @kindex C-c C-y @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
263 @kindex C-c C-x @r{(Picture mode)}
Dave Love <fx@gnu.org>
parents:
diff changeset
264 @findex picture-yank-rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
265 @findex picture-yank-rectangle-from-register
Dave Love <fx@gnu.org>
parents:
diff changeset
266 The Picture mode commands for yanking rectangles differ from the
38461
23f63206a867 Proofreading fixes from Chris Green <chris_e_green@yahoo.com>.
Eli Zaretskii <eliz@gnu.org>
parents: 25829
diff changeset
267 standard ones in that they overwrite instead of inserting. This is
23f63206a867 Proofreading fixes from Chris Green <chris_e_green@yahoo.com>.
Eli Zaretskii <eliz@gnu.org>
parents: 25829
diff changeset
268 the same way that Picture mode insertion of other text differs from
23f63206a867 Proofreading fixes from Chris Green <chris_e_green@yahoo.com>.
Eli Zaretskii <eliz@gnu.org>
parents: 25829
diff changeset
269 other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
23f63206a867 Proofreading fixes from Chris Green <chris_e_green@yahoo.com>.
Eli Zaretskii <eliz@gnu.org>
parents: 25829
diff changeset
270 (by overwriting) the rectangle that was most recently killed, while
23f63206a867 Proofreading fixes from Chris Green <chris_e_green@yahoo.com>.
Eli Zaretskii <eliz@gnu.org>
parents: 25829
diff changeset
271 @kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
23f63206a867 Proofreading fixes from Chris Green <chris_e_green@yahoo.com>.
Eli Zaretskii <eliz@gnu.org>
parents: 25829
diff changeset
272 likewise for the rectangle found in a specified register.
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 38461
diff changeset
273
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 38461
diff changeset
274 @ignore
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 38461
diff changeset
275 arch-tag: b7589747-683c-4f40-aed8-1b10403cb666
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 38461
diff changeset
276 @end ignore