Mercurial > emacs
comparison src/cmds.c @ 45618:21c0392ac82a
(Fdelete_backward_char, internal_self_insert): Cast
`current_column' return value to int.
author | Thien-Thi Nguyen <ttn@gnuvola.org> |
---|---|
date | Mon, 03 Jun 2002 01:37:29 +0000 |
parents | 628a697e2315 |
children | 461d780ae946 |
comparison
equal
deleted
inserted
replaced
45617:36bc4f35dc18 | 45618:21c0392ac82a |
---|---|
159 would move beyond there to a different line; If N is nil or 1, and point | 159 would move beyond there to a different line; If N is nil or 1, and point |
160 starts at a field boundary, point does not move. To ignore field | 160 starts at a field boundary, point does not move. To ignore field |
161 boundaries, either bind `inhibit-field-text-motion' to t, or use the | 161 boundaries, either bind `inhibit-field-text-motion' to t, or use the |
162 `forward-line' function instead. For instance, `(forward-line 0)' does | 162 `forward-line' function instead. For instance, `(forward-line 0)' does |
163 the same thing as `(beginning-of-line)', except that it ignores field | 163 the same thing as `(beginning-of-line)', except that it ignores field |
164 boundaries. */) | 164 boundaries. */) |
165 (n) | 165 (n) |
166 Lisp_Object n; | 166 Lisp_Object n; |
167 { | 167 { |
168 if (NILP (n)) | 168 if (NILP (n)) |
169 XSETFASTINT (n, 1); | 169 XSETFASTINT (n, 1); |
170 else | 170 else |
171 CHECK_NUMBER (n); | 171 CHECK_NUMBER (n); |
172 | 172 |
173 SET_PT (XINT (Fline_beginning_position (n))); | 173 SET_PT (XINT (Fline_beginning_position (n))); |
174 | 174 |
175 return Qnil; | 175 return Qnil; |
176 } | 176 } |
177 | 177 |
178 DEFUN ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "p", | 178 DEFUN ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "p", |
179 doc: /* Move point to end of current line. | 179 doc: /* Move point to end of current line. |
297 if (XINT (n) > 0 | 297 if (XINT (n) > 0 |
298 && ! NILP (current_buffer->overwrite_mode) | 298 && ! NILP (current_buffer->overwrite_mode) |
299 && ! deleted_special | 299 && ! deleted_special |
300 && ! (PT == ZV || FETCH_BYTE (PT_BYTE) == '\n')) | 300 && ! (PT == ZV || FETCH_BYTE (PT_BYTE) == '\n')) |
301 { | 301 { |
302 int column = current_column (); | 302 int column = (int) current_column (); /* iftc */ |
303 | 303 |
304 value = Fdelete_char (make_number (-XINT (n)), killflag); | 304 value = Fdelete_char (make_number (-XINT (n)), killflag); |
305 i = column - current_column (); | 305 i = column - (int) current_column (); /* iftc */ |
306 Finsert_char (make_number (' '), make_number (i), Qnil); | 306 Finsert_char (make_number (' '), make_number (i), Qnil); |
307 /* Whitespace chars are ASCII chars, so we can simply subtract. */ | 307 /* Whitespace chars are ASCII chars, so we can simply subtract. */ |
308 SET_PT_BOTH (PT - i, PT_BYTE - i); | 308 SET_PT_BOTH (PT - i, PT_BYTE - i); |
309 } | 309 } |
310 else | 310 else |
429 || (c != '\n' | 429 || (c != '\n' |
430 && c2 != '\n' | 430 && c2 != '\n' |
431 && ! (c2 == '\t' | 431 && ! (c2 == '\t' |
432 && XINT (current_buffer->tab_width) > 0 | 432 && XINT (current_buffer->tab_width) > 0 |
433 && XFASTINT (current_buffer->tab_width) < 20 | 433 && XFASTINT (current_buffer->tab_width) < 20 |
434 && (target_clm = (current_column () | 434 && (target_clm = ((int) current_column () /* iftc */ |
435 + XINT (Fchar_width (make_number (c)))), | 435 + XINT (Fchar_width (make_number (c)))), |
436 target_clm % XFASTINT (current_buffer->tab_width))))) | 436 target_clm % XFASTINT (current_buffer->tab_width))))) |
437 { | 437 { |
438 int pos = PT; | 438 int pos = PT; |
439 int pos_byte = PT_BYTE; | 439 int pos_byte = PT_BYTE; |