comparison src/cmds.c @ 109351:c8a969d13eda

merge trunk
author Kenichi Handa <handa@etlken>
date Fri, 09 Jul 2010 15:55:27 +0900
parents 8cfee7d2955f
children 4b7ca75642a8
comparison
equal deleted inserted replaced
109350:c11d07f3d731 109351:c8a969d13eda
46 extern Lisp_Object Qface; 46 extern Lisp_Object Qface;
47 extern Lisp_Object Vtranslation_table_for_input; 47 extern Lisp_Object Vtranslation_table_for_input;
48 48
49 DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, 49 DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0,
50 doc: /* Return buffer position N characters after (before if N negative) point. */) 50 doc: /* Return buffer position N characters after (before if N negative) point. */)
51 (n) 51 (Lisp_Object n)
52 Lisp_Object n;
53 { 52 {
54 CHECK_NUMBER (n); 53 CHECK_NUMBER (n);
55 54
56 return make_number (PT + XINT (n)); 55 return make_number (PT + XINT (n));
57 } 56 }
61 On reaching end or beginning of buffer, stop and signal error. 60 On reaching end or beginning of buffer, stop and signal error.
62 61
63 Depending on the bidirectional context, the movement may be to the 62 Depending on the bidirectional context, the movement may be to the
64 right or to the left on the screen. This is in contrast with 63 right or to the left on the screen. This is in contrast with
65 \\[right-char], which see. */) 64 \\[right-char], which see. */)
66 (n) 65 (Lisp_Object n)
67 Lisp_Object n;
68 { 66 {
69 if (NILP (n)) 67 if (NILP (n))
70 XSETFASTINT (n, 1); 68 XSETFASTINT (n, 1);
71 else 69 else
72 CHECK_NUMBER (n); 70 CHECK_NUMBER (n);
101 On attempt to pass beginning or end of buffer, stop and signal error. 99 On attempt to pass beginning or end of buffer, stop and signal error.
102 100
103 Depending on the bidirectional context, the movement may be to the 101 Depending on the bidirectional context, the movement may be to the
104 right or to the left on the screen. This is in contrast with 102 right or to the left on the screen. This is in contrast with
105 \\[left-char], which see. */) 103 \\[left-char], which see. */)
106 (n) 104 (Lisp_Object n)
107 Lisp_Object n;
108 { 105 {
109 if (NILP (n)) 106 if (NILP (n))
110 XSETFASTINT (n, 1); 107 XSETFASTINT (n, 1);
111 else 108 else
112 CHECK_NUMBER (n); 109 CHECK_NUMBER (n);
121 If there isn't room, go as far as possible (no error). 118 If there isn't room, go as far as possible (no error).
122 Returns the count of lines left to move. If moving forward, 119 Returns the count of lines left to move. If moving forward,
123 that is N - number of lines moved; if backward, N + number moved. 120 that is N - number of lines moved; if backward, N + number moved.
124 With positive N, a non-empty line at the end counts as one line 121 With positive N, a non-empty line at the end counts as one line
125 successfully moved (for the return value). */) 122 successfully moved (for the return value). */)
126 (n) 123 (Lisp_Object n)
127 Lisp_Object n;
128 { 124 {
129 int opoint = PT, opoint_byte = PT_BYTE; 125 int opoint = PT, opoint_byte = PT_BYTE;
130 int pos, pos_byte; 126 int pos, pos_byte;
131 int count, shortage; 127 int count, shortage;
132 128
171 If N is nil or 1, and a front-sticky field starts at point, the point 167 If N is nil or 1, and a front-sticky field starts at point, the point
172 does not move. To ignore field boundaries bind 168 does not move. To ignore field boundaries bind
173 `inhibit-field-text-motion' to t, or use the `forward-line' function 169 `inhibit-field-text-motion' to t, or use the `forward-line' function
174 instead. For instance, `(forward-line 0)' does the same thing as 170 instead. For instance, `(forward-line 0)' does the same thing as
175 `(beginning-of-line)', except that it ignores field boundaries. */) 171 `(beginning-of-line)', except that it ignores field boundaries. */)
176 (n) 172 (Lisp_Object n)
177 Lisp_Object n;
178 { 173 {
179 if (NILP (n)) 174 if (NILP (n))
180 XSETFASTINT (n, 1); 175 XSETFASTINT (n, 1);
181 else 176 else
182 CHECK_NUMBER (n); 177 CHECK_NUMBER (n);
195 This function constrains point to the current field unless this moves 190 This function constrains point to the current field unless this moves
196 point to a different line than the original, unconstrained result. If 191 point to a different line than the original, unconstrained result. If
197 N is nil or 1, and a rear-sticky field ends at point, the point does 192 N is nil or 1, and a rear-sticky field ends at point, the point does
198 not move. To ignore field boundaries bind `inhibit-field-text-motion' 193 not move. To ignore field boundaries bind `inhibit-field-text-motion'
199 to t. */) 194 to t. */)
200 (n) 195 (Lisp_Object n)
201 Lisp_Object n;
202 { 196 {
203 int newpos; 197 int newpos;
204 198
205 if (NILP (n)) 199 if (NILP (n))
206 XSETFASTINT (n, 1); 200 XSETFASTINT (n, 1);
241 Optional second arg KILLFLAG non-nil means kill instead (save in kill ring). 235 Optional second arg KILLFLAG non-nil means kill instead (save in kill ring).
242 Interactively, N is the prefix arg, and KILLFLAG is set if 236 Interactively, N is the prefix arg, and KILLFLAG is set if
243 N was explicitly specified. 237 N was explicitly specified.
244 238
245 The command `delete-forward' is preferable for interactive use. */) 239 The command `delete-forward' is preferable for interactive use. */)
246 (n, killflag) 240 (Lisp_Object n, Lisp_Object killflag)
247 Lisp_Object n, killflag;
248 { 241 {
249 int pos; 242 int pos;
250 243
251 CHECK_NUMBER (n); 244 CHECK_NUMBER (n);
252 245
284 Whichever character you type to run this command is inserted. 277 Whichever character you type to run this command is inserted.
285 Before insertion, `expand-abbrev' is executed if the inserted character does 278 Before insertion, `expand-abbrev' is executed if the inserted character does
286 not have word syntax and the previous character in the buffer does. 279 not have word syntax and the previous character in the buffer does.
287 After insertion, the value of `auto-fill-function' is called if the 280 After insertion, the value of `auto-fill-function' is called if the
288 `auto-fill-chars' table has a non-nil value for the inserted character. */) 281 `auto-fill-chars' table has a non-nil value for the inserted character. */)
289 (n) 282 (Lisp_Object n)
290 Lisp_Object n;
291 { 283 {
292 int remove_boundary = 1; 284 int remove_boundary = 1;
293 CHECK_NUMBER (n); 285 CHECK_NUMBER (n);
294 286
295 if (!EQ (Vthis_command, current_kboard->Vlast_command)) 287 if (!EQ (Vthis_command, current_kboard->Vlast_command))