aboutsummaryrefslogtreecommitdiffstats
path: root/src/insdel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/insdel.c')
-rw-r--r--src/insdel.c24
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;
70Lisp_Object Qinhibit_modification_hooks; 70Lisp_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
77void 80static void
78check_markers (void) 81check_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,
411static void 414static void
412adjust_point (EMACS_INT nchars, EMACS_INT nbytes) 415adjust_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
456void 457static void
457make_gap_larger (EMACS_INT nbytes_added) 458make_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
511void 512static void
512make_gap_smaller (EMACS_INT nbytes_removed) 513make_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). */
2104Lisp_Object 2104static Lisp_Object
2105reset_var_on_error (Lisp_Object val) 2105reset_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
2268Lisp_Object 2268static Lisp_Object
2269Fcombine_after_change_execute_1 (Lisp_Object val) 2269Fcombine_after_change_execute_1 (Lisp_Object val)
2270{ 2270{
2271 Vcombine_after_change_calls = val; 2271 Vcombine_after_change_calls = val;