diff options
| author | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
| commit | cafdcef32d55cbb44389d7e322e7f973cbb72dfd (patch) | |
| tree | 7ee0c41ea8a589650ce6f4311fb10e61a63807b9 /src/insdel.c | |
| parent | a08a25d7aaf251aa18f2ef747be53734bc55cae9 (diff) | |
| parent | 4e05e67e4cd0bc1b0a4ef3176a4d0d91c6b3738e (diff) | |
| download | emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.tar.gz emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.zip | |
Merge from trunk
Diffstat (limited to 'src/insdel.c')
| -rw-r--r-- | src/insdel.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/insdel.c b/src/insdel.c index 7fcf9522a33..ad3460f9a64 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -70,11 +70,14 @@ Lisp_Object combine_after_change_buffer; | |||
| 70 | Lisp_Object Qinhibit_modification_hooks; | 70 | Lisp_Object Qinhibit_modification_hooks; |
| 71 | 71 | ||
| 72 | #define CHECK_MARKERS() \ | 72 | #define CHECK_MARKERS() \ |
| 73 | if (check_markers_debug_flag) \ | 73 | do \ |
| 74 | check_markers (); \ | 74 | { \ |
| 75 | else | 75 | if (check_markers_debug_flag) \ |
| 76 | check_markers (); \ | ||
| 77 | } \ | ||
| 78 | while (0) | ||
| 76 | 79 | ||
| 77 | void | 80 | static void |
| 78 | check_markers (void) | 81 | check_markers (void) |
| 79 | { | 82 | { |
| 80 | register struct Lisp_Marker *tail; | 83 | register struct Lisp_Marker *tail; |
| @@ -411,9 +414,7 @@ adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte, | |||
| 411 | static void | 414 | static void |
| 412 | adjust_point (EMACS_INT nchars, EMACS_INT nbytes) | 415 | adjust_point (EMACS_INT nchars, EMACS_INT nbytes) |
| 413 | { | 416 | { |
| 414 | BUF_PT (current_buffer) += nchars; | 417 | SET_BUF_PT_BOTH (current_buffer, PT + nchars, PT_BYTE + nbytes); |
| 415 | BUF_PT_BYTE (current_buffer) += nbytes; | ||
| 416 | |||
| 417 | /* In a single-byte buffer, the two positions must be equal. */ | 418 | /* In a single-byte buffer, the two positions must be equal. */ |
| 418 | eassert (PT_BYTE >= PT && PT_BYTE - PT <= ZV_BYTE - ZV); | 419 | eassert (PT_BYTE >= PT && PT_BYTE - PT <= ZV_BYTE - ZV); |
| 419 | } | 420 | } |
| @@ -453,7 +454,7 @@ adjust_markers_for_replace (EMACS_INT from, EMACS_INT from_byte, | |||
| 453 | 454 | ||
| 454 | /* Make the gap NBYTES_ADDED bytes longer. */ | 455 | /* Make the gap NBYTES_ADDED bytes longer. */ |
| 455 | 456 | ||
| 456 | void | 457 | static void |
| 457 | make_gap_larger (EMACS_INT nbytes_added) | 458 | make_gap_larger (EMACS_INT nbytes_added) |
| 458 | { | 459 | { |
| 459 | Lisp_Object tem; | 460 | Lisp_Object tem; |
| @@ -508,7 +509,7 @@ make_gap_larger (EMACS_INT nbytes_added) | |||
| 508 | 509 | ||
| 509 | /* Make the gap NBYTES_REMOVED bytes shorter. */ | 510 | /* Make the gap NBYTES_REMOVED bytes shorter. */ |
| 510 | 511 | ||
| 511 | void | 512 | static void |
| 512 | make_gap_smaller (EMACS_INT nbytes_removed) | 513 | make_gap_smaller (EMACS_INT nbytes_removed) |
| 513 | { | 514 | { |
| 514 | Lisp_Object tem; | 515 | Lisp_Object tem; |
| @@ -595,7 +596,6 @@ copy_text (const unsigned char *from_addr, unsigned char *to_addr, | |||
| 595 | { | 596 | { |
| 596 | EMACS_INT nchars = 0; | 597 | EMACS_INT nchars = 0; |
| 597 | EMACS_INT bytes_left = nbytes; | 598 | EMACS_INT bytes_left = nbytes; |
| 598 | Lisp_Object tbl = Qnil; | ||
| 599 | 599 | ||
| 600 | while (bytes_left > 0) | 600 | while (bytes_left > 0) |
| 601 | { | 601 | { |
| @@ -2101,7 +2101,7 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end, | |||
| 2101 | VARIABLE is the variable to maybe set to nil. | 2101 | VARIABLE is the variable to maybe set to nil. |
| 2102 | NO-ERROR-FLAG is nil if there was an error, | 2102 | NO-ERROR-FLAG is nil if there was an error, |
| 2103 | anything else meaning no error (so this function does nothing). */ | 2103 | anything else meaning no error (so this function does nothing). */ |
| 2104 | Lisp_Object | 2104 | static Lisp_Object |
| 2105 | reset_var_on_error (Lisp_Object val) | 2105 | reset_var_on_error (Lisp_Object val) |
| 2106 | { | 2106 | { |
| 2107 | if (NILP (XCDR (val))) | 2107 | if (NILP (XCDR (val))) |
| @@ -2265,7 +2265,7 @@ signal_after_change (EMACS_INT charpos, EMACS_INT lendel, EMACS_INT lenins) | |||
| 2265 | unbind_to (count, Qnil); | 2265 | unbind_to (count, Qnil); |
| 2266 | } | 2266 | } |
| 2267 | 2267 | ||
| 2268 | Lisp_Object | 2268 | static Lisp_Object |
| 2269 | Fcombine_after_change_execute_1 (Lisp_Object val) | 2269 | Fcombine_after_change_execute_1 (Lisp_Object val) |
| 2270 | { | 2270 | { |
| 2271 | Vcombine_after_change_calls = val; | 2271 | Vcombine_after_change_calls = val; |