comparison src/cmds.c @ 109859:68616bb3ae25

merged from trunk
author Joakim <joakim@localhost.localdomain>
date Mon, 14 Jun 2010 11:48:51 +0200
parents c4f9f87f04a2
children d8144fe7f3f8
comparison
equal deleted inserted replaced
109858:73108272ef0b 109859:68616bb3ae25
55 55
56 return make_number (PT + XINT (n)); 56 return make_number (PT + XINT (n));
57 } 57 }
58 58
59 DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", 59 DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p",
60 doc: /* Move point right N characters (left if N is negative). 60 doc: /* Move point N characters forward (backward if N is negative).
61 On reaching end of buffer, stop and signal error. */) 61 On reaching end or beginning of buffer, stop and signal error.
62
63 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
65 \\[right-char], which see. */)
62 (n) 66 (n)
63 Lisp_Object n; 67 Lisp_Object n;
64 { 68 {
65 if (NILP (n)) 69 if (NILP (n))
66 XSETFASTINT (n, 1); 70 XSETFASTINT (n, 1);
91 95
92 return Qnil; 96 return Qnil;
93 } 97 }
94 98
95 DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p", 99 DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p",
96 doc: /* Move point left N characters (right if N is negative). 100 doc: /* Move point N characters backward (forward if N is negative).
97 On attempt to pass beginning or end of buffer, stop and signal error. */) 101 On attempt to pass beginning or end of buffer, stop and signal error.
102
103 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
105 \\[left-char], which see. */)
98 (n) 106 (n)
99 Lisp_Object n; 107 Lisp_Object n;
100 { 108 {
101 if (NILP (n)) 109 if (NILP (n))
102 XSETFASTINT (n, 1); 110 XSETFASTINT (n, 1);
112 Precisely, if point is on line I, move to the start of line I + N. 120 Precisely, if point is on line I, move to the start of line I + N.
113 If there isn't room, go as far as possible (no error). 121 If there isn't room, go as far as possible (no error).
114 Returns the count of lines left to move. If moving forward, 122 Returns the count of lines left to move. If moving forward,
115 that is N - number of lines moved; if backward, N + number moved. 123 that is N - number of lines moved; if backward, N + number moved.
116 With positive N, a non-empty line at the end counts as one line 124 With positive N, a non-empty line at the end counts as one line
117 successfully moved (for the return value). */) 125 successfully moved (for the return value). */)
118 (n) 126 (n)
119 Lisp_Object n; 127 Lisp_Object n;
120 { 128 {
121 int opoint = PT, opoint_byte = PT_BYTE; 129 int opoint = PT, opoint_byte = PT_BYTE;
122 int pos, pos_byte; 130 int pos, pos_byte;
157 doc: /* Move point to beginning of current line. 165 doc: /* Move point to beginning of current line.
158 With argument N not nil or 1, move forward N - 1 lines first. 166 With argument N not nil or 1, move forward N - 1 lines first.
159 If point reaches the beginning or end of buffer, it stops there. 167 If point reaches the beginning or end of buffer, it stops there.
160 168
161 This function constrains point to the current field unless this moves 169 This function constrains point to the current field unless this moves
162 point to a different line than the original, unconstrained result. If 170 point to a different line than the original, unconstrained result.
163 N is nil or 1, and a front-sticky field starts at point, the point 171 If N is nil or 1, and a front-sticky field starts at point, the point
164 does not move. To ignore field boundaries bind 172 does not move. To ignore field boundaries bind
165 `inhibit-field-text-motion' to t, or use the `forward-line' function 173 `inhibit-field-text-motion' to t, or use the `forward-line' function
166 instead. For instance, `(forward-line 0)' does the same thing as 174 instead. For instance, `(forward-line 0)' does the same thing as
167 `(beginning-of-line)', except that it ignores field boundaries. */) 175 `(beginning-of-line)', except that it ignores field boundaries. */)
168 (n) 176 (n)
268 DEFUN ("delete-backward-char", Fdelete_backward_char, Sdelete_backward_char, 276 DEFUN ("delete-backward-char", Fdelete_backward_char, Sdelete_backward_char,
269 1, 2, "p\nP", 277 1, 2, "p\nP",
270 doc: /* Delete the previous N characters (following if N is negative). 278 doc: /* Delete the previous N characters (following if N is negative).
271 Optional second arg KILLFLAG non-nil means kill instead (save in kill ring). 279 Optional second arg KILLFLAG non-nil means kill instead (save in kill ring).
272 Interactively, N is the prefix arg, and KILLFLAG is set if 280 Interactively, N is the prefix arg, and KILLFLAG is set if
273 N was explicitly specified. */) 281 N was explicitly specified.
282 This is meant for interactive use only; from Lisp, better use `delete-char'
283 with a negated argument. */)
274 (n, killflag) 284 (n, killflag)
275 Lisp_Object n, killflag; 285 Lisp_Object n, killflag;
276 { 286 {
277 Lisp_Object value; 287 Lisp_Object value;
278 int deleted_special = 0; 288 int deleted_special = 0;