diff options
Diffstat (limited to 'src/cmds.c')
| -rw-r--r-- | src/cmds.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/cmds.c b/src/cmds.c index 9c29982cc80..1d835d8554f 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -57,7 +57,7 @@ On reaching end of buffer, stop and signal error.") | |||
| 57 | hooks, etcetera), that's not a good approach. So we validate the | 57 | hooks, etcetera), that's not a good approach. So we validate the |
| 58 | proposed position, then set point. */ | 58 | proposed position, then set point. */ |
| 59 | { | 59 | { |
| 60 | int new_point = point + XINT (n); | 60 | int new_point = PT + XINT (n); |
| 61 | 61 | ||
| 62 | if (new_point < BEGV) | 62 | if (new_point < BEGV) |
| 63 | { | 63 | { |
| @@ -102,7 +102,7 @@ With positive N, a non-empty line at the end counts as one line\n\ | |||
| 102 | (n) | 102 | (n) |
| 103 | Lisp_Object n; | 103 | Lisp_Object n; |
| 104 | { | 104 | { |
| 105 | int pos2 = point; | 105 | int pos2 = PT; |
| 106 | int pos; | 106 | int pos; |
| 107 | int count, shortage, negp; | 107 | int count, shortage, negp; |
| 108 | 108 | ||
| @@ -178,17 +178,17 @@ N was explicitly specified.") | |||
| 178 | { | 178 | { |
| 179 | if (XINT (n) < 0) | 179 | if (XINT (n) < 0) |
| 180 | { | 180 | { |
| 181 | if (point + XINT (n) < BEGV) | 181 | if (PT + XINT (n) < BEGV) |
| 182 | Fsignal (Qbeginning_of_buffer, Qnil); | 182 | Fsignal (Qbeginning_of_buffer, Qnil); |
| 183 | else | 183 | else |
| 184 | del_range (point + XINT (n), point); | 184 | del_range (PT + XINT (n), PT); |
| 185 | } | 185 | } |
| 186 | else | 186 | else |
| 187 | { | 187 | { |
| 188 | if (point + XINT (n) > ZV) | 188 | if (PT + XINT (n) > ZV) |
| 189 | Fsignal (Qend_of_buffer, Qnil); | 189 | Fsignal (Qend_of_buffer, Qnil); |
| 190 | else | 190 | else |
| 191 | del_range (point, point + XINT (n)); | 191 | del_range (PT, PT + XINT (n)); |
| 192 | } | 192 | } |
| 193 | } | 193 | } |
| 194 | else | 194 | else |
| @@ -216,9 +216,9 @@ N was explicitly specified.") | |||
| 216 | /* See if we are about to delete a tab or newline backwards. */ | 216 | /* See if we are about to delete a tab or newline backwards. */ |
| 217 | for (i = 1; i <= XINT (n); i++) | 217 | for (i = 1; i <= XINT (n); i++) |
| 218 | { | 218 | { |
| 219 | if (point - i < BEGV) | 219 | if (PT - i < BEGV) |
| 220 | break; | 220 | break; |
| 221 | if (FETCH_CHAR (point - i) == '\t' || FETCH_CHAR (point - i) == '\n') | 221 | if (FETCH_CHAR (PT - i) == '\t' || FETCH_CHAR (PT - i) == '\n') |
| 222 | { | 222 | { |
| 223 | deleted_special = 1; | 223 | deleted_special = 1; |
| 224 | break; | 224 | break; |
| @@ -232,10 +232,10 @@ N was explicitly specified.") | |||
| 232 | if (XINT (n) > 0 | 232 | if (XINT (n) > 0 |
| 233 | && ! NILP (current_buffer->overwrite_mode) | 233 | && ! NILP (current_buffer->overwrite_mode) |
| 234 | && ! deleted_special | 234 | && ! deleted_special |
| 235 | && ! (point == ZV || FETCH_CHAR (point) == '\n')) | 235 | && ! (PT == ZV || FETCH_CHAR (PT) == '\n')) |
| 236 | { | 236 | { |
| 237 | Finsert_char (make_number (' '), XINT (n)); | 237 | Finsert_char (make_number (' '), XINT (n)); |
| 238 | SET_PT (point - XINT (n)); | 238 | SET_PT (PT - XINT (n)); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | return value; | 241 | return value; |
| @@ -302,22 +302,22 @@ internal_self_insert (c1, noautofill) | |||
| 302 | hairy = 1; | 302 | hairy = 1; |
| 303 | 303 | ||
| 304 | if (!NILP (overwrite) | 304 | if (!NILP (overwrite) |
| 305 | && point < ZV | 305 | && PT < ZV |
| 306 | && (EQ (overwrite, Qoverwrite_mode_binary) | 306 | && (EQ (overwrite, Qoverwrite_mode_binary) |
| 307 | || (c != '\n' && FETCH_CHAR (point) != '\n')) | 307 | || (c != '\n' && FETCH_CHAR (PT) != '\n')) |
| 308 | && (EQ (overwrite, Qoverwrite_mode_binary) | 308 | && (EQ (overwrite, Qoverwrite_mode_binary) |
| 309 | || FETCH_CHAR (point) != '\t' | 309 | || FETCH_CHAR (PT) != '\t' |
| 310 | || XINT (current_buffer->tab_width) <= 0 | 310 | || XINT (current_buffer->tab_width) <= 0 |
| 311 | || XFASTINT (current_buffer->tab_width) > 20 | 311 | || XFASTINT (current_buffer->tab_width) > 20 |
| 312 | || !((current_column () + 1) % XFASTINT (current_buffer->tab_width)))) | 312 | || !((current_column () + 1) % XFASTINT (current_buffer->tab_width)))) |
| 313 | { | 313 | { |
| 314 | del_range (point, point + 1); | 314 | del_range (PT, PT + 1); |
| 315 | hairy = 2; | 315 | hairy = 2; |
| 316 | } | 316 | } |
| 317 | if (!NILP (current_buffer->abbrev_mode) | 317 | if (!NILP (current_buffer->abbrev_mode) |
| 318 | && SYNTAX (c) != Sword | 318 | && SYNTAX (c) != Sword |
| 319 | && NILP (current_buffer->read_only) | 319 | && NILP (current_buffer->read_only) |
| 320 | && point > BEGV && SYNTAX (FETCH_CHAR (point - 1)) == Sword) | 320 | && PT > BEGV && SYNTAX (FETCH_CHAR (PT - 1)) == Sword) |
| 321 | { | 321 | { |
| 322 | int modiff = MODIFF; | 322 | int modiff = MODIFF; |
| 323 | Fexpand_abbrev (); | 323 | Fexpand_abbrev (); |
| @@ -338,10 +338,10 @@ internal_self_insert (c1, noautofill) | |||
| 338 | /* After inserting a newline, move to previous line and fill */ | 338 | /* After inserting a newline, move to previous line and fill */ |
| 339 | /* that. Must have the newline in place already so filling and */ | 339 | /* that. Must have the newline in place already so filling and */ |
| 340 | /* justification, if any, know where the end is going to be. */ | 340 | /* justification, if any, know where the end is going to be. */ |
| 341 | SET_PT (point - 1); | 341 | SET_PT (PT - 1); |
| 342 | tem = call0 (current_buffer->auto_fill_function); | 342 | tem = call0 (current_buffer->auto_fill_function); |
| 343 | if (c1 == '\n') | 343 | if (c1 == '\n') |
| 344 | SET_PT (point + 1); | 344 | SET_PT (PT + 1); |
| 345 | if (!NILP (tem)) | 345 | if (!NILP (tem)) |
| 346 | hairy = 2; | 346 | hairy = 2; |
| 347 | } | 347 | } |