Mercurial > emacs
changeset 7108:6e6410985d76
Use PT, not point.
(gap_left, gap_right, adjust_markers): Make these functions static.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 26 Apr 1994 02:11:35 +0000 |
parents | 1b92b31b3897 |
children | d4842450463c |
files | src/insdel.c |
diffstat | 1 files changed, 28 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/insdel.c Tue Apr 26 01:41:27 1994 +0000 +++ b/src/insdel.c Tue Apr 26 02:11:35 1994 +0000 @@ -27,6 +27,9 @@ static void insert_1 (); static void insert_from_string_1 (); +static void gap_left (); +static void gap_right (); +static void adjust_markers (); /* Move gap to position `pos'. Note that this can quit! */ @@ -43,6 +46,7 @@ /* Move the gap to POS, which is less than the current GPT. If NEWGAP is nonzero, then don't update beg_unchanged and end_unchanged. */ +static void gap_left (pos, newgap) register int pos; int newgap; @@ -125,6 +129,7 @@ QUIT; } +static void gap_right (pos) register int pos; { @@ -206,6 +211,7 @@ of adjustment, are first moved back to the near end of the interval and then adjusted by `amount'. */ +static void adjust_markers (from, to, amount) register int from, to, amount; { @@ -290,7 +296,7 @@ if (length > 0) { insert_1 (string, length); - signal_after_change (point-length, 0, length); + signal_after_change (PT-length, 0, length); } } @@ -306,26 +312,26 @@ if (length + Z != XINT (temp)) error ("maximum buffer size exceeded"); - prepare_to_modify_buffer (point, point); + prepare_to_modify_buffer (PT, PT); - if (point != GPT) - move_gap (point); + if (PT != GPT) + move_gap (PT); if (GAP_SIZE < length) make_gap (length - GAP_SIZE); - record_insert (point, length); + record_insert (PT, length); MODIFF++; bcopy (string, GPT_ADDR, length); /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ - offset_intervals (current_buffer, point, length); + offset_intervals (current_buffer, PT, length); GAP_SIZE -= length; GPT += length; ZV += length; Z += length; - SET_PT (point + length); + SET_PT (PT + length); } /* Insert the part of the text of STRING, a Lisp object assumed to be @@ -345,7 +351,7 @@ if (length > 0) { insert_from_string_1 (string, pos, length, inherit); - signal_after_change (point-length, 0, length); + signal_after_change (PT-length, 0, length); } } @@ -364,21 +370,21 @@ error ("maximum buffer size exceeded"); GCPRO1 (string); - prepare_to_modify_buffer (point, point); + prepare_to_modify_buffer (PT, PT); - if (point != GPT) - move_gap (point); + if (PT != GPT) + move_gap (PT); if (GAP_SIZE < length) make_gap (length - GAP_SIZE); - record_insert (point, length); + record_insert (PT, length); MODIFF++; UNGCPRO; bcopy (XSTRING (string)->data, GPT_ADDR, length); /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ - offset_intervals (current_buffer, point, length); + offset_intervals (current_buffer, PT, length); GAP_SIZE -= length; GPT += length; @@ -386,10 +392,10 @@ Z += length; /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ - graft_intervals_into_buffer (XSTRING (string)->intervals, point, length, + graft_intervals_into_buffer (XSTRING (string)->intervals, PT, length, current_buffer, inherit); - SET_PT (point + length); + SET_PT (PT + length); } /* Insert the character C before point */ @@ -421,10 +427,10 @@ { if (length > 0) { - register int opoint = point; + register int opoint = PT; insert_1 (string, length); adjust_markers (opoint - 1, opoint, length); - signal_after_change (point-length, 0, length); + signal_after_change (PT-length, 0, length); } } @@ -437,10 +443,10 @@ { if (length > 0) { - register int opoint = point; + register int opoint = PT; insert_from_string_1 (string, pos, length, inherit); adjust_markers (opoint - 1, opoint, length); - signal_after_change (point-length, 0, length); + signal_after_change (PT-length, 0, length); } } @@ -482,12 +488,12 @@ MODIFF++; /* Relocate point as if it were a marker. */ - if (from < point) + if (from < PT) { - if (point < to) + if (PT < to) SET_PT (from); else - SET_PT (point - numdel); + SET_PT (PT - numdel); } /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */