From 6ec8bbd20d14dadb850f993d828b42bb97deba32 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Sun, 1 Sep 1996 19:15:05 +0000 Subject: [PATCH] Change all references from point to PT. --- src/abbrev.c | 22 +++++++++++----------- src/bytecode.c | 2 +- src/callint.c | 4 ++-- src/casefiddle.c | 10 +++++----- src/cmds.c | 34 +++++++++++++++++----------------- src/dispnew.c | 16 ++++++++-------- src/editfns.c | 28 ++++++++++++++-------------- src/indent.c | 28 ++++++++++++++-------------- src/lread.c | 2 +- src/print.c | 8 ++++---- src/process.c | 18 +++++++++--------- src/search.c | 38 +++++++++++++++++++------------------- src/syntax.c | 4 ++-- src/undo.c | 2 +- src/window.c | 2 +- 15 files changed, 109 insertions(+), 109 deletions(-) diff --git a/src/abbrev.c b/src/abbrev.c index 6d88dad7716..d6acfe289ba 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -246,7 +246,7 @@ Returns t if expansion took place.") del_range (wordstart, wordstart + 1); } if (!wordstart) - wordstart = scan_words (point, -1); + wordstart = scan_words (PT, -1); if (!wordstart) return value; @@ -255,9 +255,9 @@ Returns t if expansion took place.") if (!wordend) return value; - if (wordend > point) - wordend = point; - whitecnt = point - wordend; + if (wordend > PT) + wordend = PT; + whitecnt = PT - wordend; if (wordend <= wordstart) return value; @@ -304,7 +304,7 @@ Returns t if expansion took place.") expansion = XSYMBOL (sym)->value; insert_from_string (expansion, 0, XSTRING (expansion)->size, 1); - SET_PT (point + whitecnt); + SET_PT (PT + whitecnt); if (uccount && !lccount) { @@ -313,14 +313,14 @@ Returns t if expansion took place.") /* This used to be if (!... && ... >= ...) Fcapitalize; else Fupcase but Megatest 68000 compiler can't handle that */ if (!abbrev_all_caps) - if (scan_words (point, -1) > scan_words (wordstart, 1)) + if (scan_words (PT, -1) > scan_words (wordstart, 1)) { Fupcase_initials_region (make_number (wordstart), - make_number (point)); + make_number (PT)); goto caped; } /* If expansion is one word, or if user says so, upcase it all. */ - Fupcase_region (make_number (wordstart), make_number (point)); + Fupcase_region (make_number (wordstart), make_number (PT)); caped: ; } else if (uccount) @@ -329,7 +329,7 @@ Returns t if expansion took place.") int pos = wordstart; /* Find the initial. */ - while (pos < point + while (pos < PT && SYNTAX (*BUF_CHAR_ADDRESS (current_buffer, pos)) != Sword) pos++; @@ -350,7 +350,7 @@ This differs from ordinary undo in that other editing done since then\n\ is not undone.") () { - int opoint = point; + int opoint = PT; int adjust = 0; if (last_abbrev_point < BEGV || last_abbrev_point > ZV) @@ -365,7 +365,7 @@ is not undone.") if (!STRINGP (val)) error ("value of abbrev-symbol must be a string"); adjust = XSTRING (val)->size; - del_range (point, point + adjust); + del_range (PT, PT + adjust); /* Don't inherit properties here; just copy from old contents. */ insert_from_string (Vlast_abbrev_text, 0, XSTRING (Vlast_abbrev_text)->size, 0); diff --git a/src/bytecode.c b/src/bytecode.c index 4fb6d86bb69..646ada96aa1 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -841,7 +841,7 @@ If the third argument is incorrect, Emacs may crash.") break; case Bpoint: - XSETFASTINT (v1, point); + XSETFASTINT (v1, PT); PUSH (v1); break; diff --git a/src/callint.c b/src/callint.c index 14f34f3b5f6..3741a0930d1 100644 --- a/src/callint.c +++ b/src/callint.c @@ -606,9 +606,9 @@ Otherwise, this is done only if an arg is read using the minibuffer.") /* visargs[i+1] = Qnil; */ foo = marker_position (current_buffer->mark); /* visargs[i] = Qnil; */ - args[i] = point < foo ? point_marker : current_buffer->mark; + args[i] = PT < foo ? point_marker : current_buffer->mark; varies[i] = 3; - args[++i] = point > foo ? point_marker : current_buffer->mark; + args[++i] = PT > foo ? point_marker : current_buffer->mark; varies[i] = 4; break; diff --git a/src/casefiddle.c b/src/casefiddle.c index 1e3856100a0..f4400814778 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -227,11 +227,11 @@ operate_on_word (arg, newpoint) CHECK_NUMBER (arg, 0); iarg = XINT (arg); - farend = scan_words (point, iarg); + farend = scan_words (PT, iarg); if (!farend) farend = iarg > 0 ? ZV : BEGV; - *newpoint = point > farend ? point : farend; + *newpoint = PT > farend ? PT : farend; XSETFASTINT (val, farend); return val; @@ -246,7 +246,7 @@ See also `capitalize-word'.") { Lisp_Object beg, end; int newpoint; - XSETFASTINT (beg, point); + XSETFASTINT (beg, PT); end = operate_on_word (arg, &newpoint); casify_region (CASE_UP, beg, end); SET_PT (newpoint); @@ -261,7 +261,7 @@ With negative argument, convert previous words but do not move.") { Lisp_Object beg, end; int newpoint; - XSETFASTINT (beg, point); + XSETFASTINT (beg, PT); end = operate_on_word (arg, &newpoint); casify_region (CASE_DOWN, beg, end); SET_PT (newpoint); @@ -278,7 +278,7 @@ With negative argument, capitalize previous words but do not move.") { Lisp_Object beg, end; int newpoint; - XSETFASTINT (beg, point); + XSETFASTINT (beg, PT); end = operate_on_word (arg, &newpoint); casify_region (CASE_CAPITALIZE, beg, end); SET_PT (newpoint); 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.") hooks, etcetera), that's not a good approach. So we validate the proposed position, then set point. */ { - int new_point = point + XINT (n); + int new_point = PT + XINT (n); if (new_point < BEGV) { @@ -102,7 +102,7 @@ With positive N, a non-empty line at the end counts as one line\n\ (n) Lisp_Object n; { - int pos2 = point; + int pos2 = PT; int pos; int count, shortage, negp; @@ -178,17 +178,17 @@ N was explicitly specified.") { if (XINT (n) < 0) { - if (point + XINT (n) < BEGV) + if (PT + XINT (n) < BEGV) Fsignal (Qbeginning_of_buffer, Qnil); else - del_range (point + XINT (n), point); + del_range (PT + XINT (n), PT); } else { - if (point + XINT (n) > ZV) + if (PT + XINT (n) > ZV) Fsignal (Qend_of_buffer, Qnil); else - del_range (point, point + XINT (n)); + del_range (PT, PT + XINT (n)); } } else @@ -216,9 +216,9 @@ N was explicitly specified.") /* See if we are about to delete a tab or newline backwards. */ for (i = 1; i <= XINT (n); i++) { - if (point - i < BEGV) + if (PT - i < BEGV) break; - if (FETCH_CHAR (point - i) == '\t' || FETCH_CHAR (point - i) == '\n') + if (FETCH_CHAR (PT - i) == '\t' || FETCH_CHAR (PT - i) == '\n') { deleted_special = 1; break; @@ -232,10 +232,10 @@ N was explicitly specified.") if (XINT (n) > 0 && ! NILP (current_buffer->overwrite_mode) && ! deleted_special - && ! (point == ZV || FETCH_CHAR (point) == '\n')) + && ! (PT == ZV || FETCH_CHAR (PT) == '\n')) { Finsert_char (make_number (' '), XINT (n)); - SET_PT (point - XINT (n)); + SET_PT (PT - XINT (n)); } return value; @@ -302,22 +302,22 @@ internal_self_insert (c1, noautofill) hairy = 1; if (!NILP (overwrite) - && point < ZV + && PT < ZV && (EQ (overwrite, Qoverwrite_mode_binary) - || (c != '\n' && FETCH_CHAR (point) != '\n')) + || (c != '\n' && FETCH_CHAR (PT) != '\n')) && (EQ (overwrite, Qoverwrite_mode_binary) - || FETCH_CHAR (point) != '\t' + || FETCH_CHAR (PT) != '\t' || XINT (current_buffer->tab_width) <= 0 || XFASTINT (current_buffer->tab_width) > 20 || !((current_column () + 1) % XFASTINT (current_buffer->tab_width)))) { - del_range (point, point + 1); + del_range (PT, PT + 1); hairy = 2; } if (!NILP (current_buffer->abbrev_mode) && SYNTAX (c) != Sword && NILP (current_buffer->read_only) - && point > BEGV && SYNTAX (FETCH_CHAR (point - 1)) == Sword) + && PT > BEGV && SYNTAX (FETCH_CHAR (PT - 1)) == Sword) { int modiff = MODIFF; Fexpand_abbrev (); @@ -338,10 +338,10 @@ internal_self_insert (c1, noautofill) /* After inserting a newline, move to previous line and fill */ /* that. Must have the newline in place already so filling and */ /* justification, if any, know where the end is going to be. */ - SET_PT (point - 1); + SET_PT (PT - 1); tem = call0 (current_buffer->auto_fill_function); if (c1 == '\n') - SET_PT (point + 1); + SET_PT (PT + 1); if (!NILP (tem)) hairy = 2; } diff --git a/src/dispnew.c b/src/dispnew.c index 96d513b8e59..4c14f0a972b 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1104,7 +1104,7 @@ direct_output_for_insert (g) At the moment we only lose at end of line or end of buffer and only with faces that have some background */ /* Instead of wasting time, give up if character has any text properties */ - || ! NILP (Ftext_properties_at (make_number (point - 1), Qnil)) + || ! NILP (Ftext_properties_at (make_number (PT - 1), Qnil)) #endif /* Give up if w is minibuffer and a message is being displayed there */ @@ -1117,17 +1117,17 @@ direct_output_for_insert (g) int dummy; if (FRAME_WINDOW_P (frame) || FRAME_MSDOS_P (frame)) - face = compute_char_face (frame, w, point - 1, -1, -1, &dummy, point, 0); + face = compute_char_face (frame, w, PT - 1, -1, -1, &dummy, PT, 0); #endif current_frame->glyphs[vpos][hpos] = MAKE_GLYPH (frame, g, face); - current_frame->charstarts[vpos][hpos] = point - 1; + current_frame->charstarts[vpos][hpos] = PT - 1; /* Record the entry for after the newly inserted character. */ - current_frame->charstarts[vpos][hpos + 1] = point; + current_frame->charstarts[vpos][hpos + 1] = PT; adjust_window_charstarts (w, vpos, 1); } unchanged_modified = MODIFF; beg_unchanged = GPT - BEG; - XSETFASTINT (w->last_point, point); + XSETFASTINT (w->last_point, PT); XSETFASTINT (w->last_point_x, hpos); XSETFASTINT (w->last_modified, MODIFF); @@ -1179,14 +1179,14 @@ direct_output_forward_char (n) /* Don't use direct output next to an invisible character since we might need to do something special. */ - XSETFASTINT (position, point); + XSETFASTINT (position, PT); if (XFASTINT (position) < ZV && ! NILP (Fget_char_property (position, Qinvisible, selected_window))) return 0; - XSETFASTINT (position, point - 1); + XSETFASTINT (position, PT - 1); if (XFASTINT (position) >= BEGV && ! NILP (Fget_char_property (position, Qinvisible, @@ -1196,7 +1196,7 @@ direct_output_forward_char (n) FRAME_CURSOR_X (frame) += n; XSETFASTINT (w->last_point_x, FRAME_CURSOR_X (frame)); - XSETFASTINT (w->last_point, point); + XSETFASTINT (w->last_point, PT); cursor_to (FRAME_CURSOR_Y (frame), FRAME_CURSOR_X (frame)); fflush (stdout); diff --git a/src/editfns.c b/src/editfns.c index 88d8841a06d..6870ae11b4a 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -178,7 +178,7 @@ Beginning of buffer is position (point-min)") () { Lisp_Object temp; - XSETFASTINT (temp, point); + XSETFASTINT (temp, PT); return temp; } @@ -186,7 +186,7 @@ DEFUN ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, "Return value of point, as a marker object.") () { - return buildmark (point); + return buildmark (PT); } int @@ -224,8 +224,8 @@ region_limit (beginningp) Fsignal (Qmark_inactive, Qnil); m = Fmarker_position (current_buffer->mark); if (NILP (m)) error ("There is no region now"); - if ((point < XFASTINT (m)) == beginningp) - return (make_number (point)); + if ((PT < XFASTINT (m)) == beginningp) + return (make_number (PT)); else return (m); } @@ -393,10 +393,10 @@ At the end of the buffer or accessible region, return 0.") () { Lisp_Object temp; - if (point >= ZV) + if (PT >= ZV) XSETFASTINT (temp, 0); else - XSETFASTINT (temp, FETCH_CHAR (point)); + XSETFASTINT (temp, FETCH_CHAR (PT)); return temp; } @@ -406,10 +406,10 @@ At the beginning of the buffer or accessible region, return 0.") () { Lisp_Object temp; - if (point <= BEGV) + if (PT <= BEGV) XSETFASTINT (temp, 0); else - XSETFASTINT (temp, FETCH_CHAR (point - 1)); + XSETFASTINT (temp, FETCH_CHAR (PT - 1)); return temp; } @@ -418,7 +418,7 @@ DEFUN ("bobp", Fbobp, Sbobp, 0, 0, 0, If the buffer is narrowed, this means the beginning of the narrowed part.") () { - if (point == BEGV) + if (PT == BEGV) return Qt; return Qnil; } @@ -428,7 +428,7 @@ DEFUN ("eobp", Feobp, Seobp, 0, 0, 0, If the buffer is narrowed, this means the end of the narrowed part.") () { - if (point == ZV) + if (PT == ZV) return Qt; return Qnil; } @@ -437,7 +437,7 @@ DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, "Return T if point is at the beginning of a line.") () { - if (point == BEGV || FETCH_CHAR (point - 1) == '\n') + if (PT == BEGV || FETCH_CHAR (PT - 1) == '\n') return Qt; return Qnil; } @@ -447,7 +447,7 @@ DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, `End of a line' includes point being at the end of the buffer.") () { - if (point == ZV || FETCH_CHAR (point) == '\n') + if (PT == ZV || FETCH_CHAR (PT) == '\n') return Qt; return Qnil; } @@ -1703,9 +1703,9 @@ or markers) bounding the text that should remain visible.") BEGV = XFASTINT (start); SET_BUF_ZV (current_buffer, XFASTINT (end)); - if (point < XFASTINT (start)) + if (PT < XFASTINT (start)) SET_PT (XFASTINT (start)); - if (point > XFASTINT (end)) + if (PT > XFASTINT (end)) SET_PT (XFASTINT (end)); current_buffer->clip_changed = 1; /* Changing the buffer bounds invalidates any recorded current column. */ diff --git a/src/indent.c b/src/indent.c index 503038b5401..2a05a3d4a65 100644 --- a/src/indent.c +++ b/src/indent.c @@ -283,7 +283,7 @@ current_column () register struct Lisp_Char_Table *dp = buffer_display_table (); int stopchar; - if (point == last_known_column_point + if (PT == last_known_column_point && MODIFF == last_known_column_modified) return last_known_column; @@ -292,18 +292,18 @@ current_column () if (BUF_INTERVALS (current_buffer) || !NILP (current_buffer->overlays_before) || !NILP (current_buffer->overlays_after)) - return current_column_1 (point); + return current_column_1 (PT); /* Scan backwards from point to the previous newline, counting width. Tab characters are the only complicated case. */ /* Make a pointer for decrementing through the chars before point. */ - ptr = &FETCH_CHAR (point - 1) + 1; + ptr = &FETCH_CHAR (PT - 1) + 1; /* Make a pointer to where consecutive chars leave off, going backwards from point. */ - if (point == BEGV) + if (PT == BEGV) stop = ptr; - else if (point <= GPT || BEGV > GPT) + else if (PT <= GPT || BEGV > GPT) stop = BEGV_ADDR; else stop = GAP_END_ADDR; @@ -356,7 +356,7 @@ current_column () } last_known_column = col; - last_known_column_point = point; + last_known_column_point = PT; last_known_column_modified = MODIFF; return col; @@ -425,7 +425,7 @@ current_column_1 (pos) endloop: last_known_column = col; - last_known_column_point = point; + last_known_column_point = PT; last_known_column_modified = MODIFF; return col; @@ -550,7 +550,7 @@ even if that goes past COLUMN; by default, MININUM is zero.") Finsert_char (make_number (' '), column, Qt); last_known_column = mincol; - last_known_column_point = point; + last_known_column_point = PT; last_known_column_modified = MODIFF; XSETINT (column, mincol); @@ -567,7 +567,7 @@ following any initial whitespace.") { Lisp_Object val; - XSETFASTINT (val, position_indentation (find_next_newline (point, -1))); + XSETFASTINT (val, position_indentation (find_next_newline (PT, -1))); return val; } @@ -680,7 +680,7 @@ The return value is the current column.") CHECK_NATNUM (column, 0); goal = XINT (column); - pos = point; + pos = PT; end = ZV; next_boundary = pos; @@ -743,9 +743,9 @@ The return value is the current column.") { int old_point; - del_range (point - 1, point); + del_range (PT - 1, PT); Findent_to (make_number (goal), Qnil); - old_point = point; + old_point = PT; Findent_to (make_number (col), Qnil); SET_PT (old_point); /* Set the last_known... vars consistently. */ @@ -757,7 +757,7 @@ The return value is the current column.") Findent_to (make_number (col = goal), Qnil); last_known_column = col; - last_known_column_point = point; + last_known_column_point = PT; last_known_column_modified = MODIFF; XSETFASTINT (val, col); @@ -1409,7 +1409,7 @@ whether or not it is currently displayed in some window.") else window = selected_window; - pos = *vmotion (point, (int) XINT (lines), XWINDOW (window)); + pos = *vmotion (PT, (int) XINT (lines), XWINDOW (window)); SET_PT (pos.bufpos); return make_number (pos.vpos); diff --git a/src/lread.c b/src/lread.c index f9b95acc170..21f32863f98 100644 --- a/src/lread.c +++ b/src/lread.c @@ -219,7 +219,7 @@ unreadchar (readcharfun, c) else if (BUFFERP (readcharfun)) { if (XBUFFER (readcharfun) == current_buffer) - SET_PT (point - 1); + SET_PT (PT - 1); else SET_BUF_PT (XBUFFER (readcharfun), BUF_PT (XBUFFER (readcharfun)) - 1); } diff --git a/src/print.c b/src/print.c index b6a12e7228d..b34adbf9814 100644 --- a/src/print.c +++ b/src/print.c @@ -173,9 +173,9 @@ glyph_to_str_cpy (glyphs, str) error ("Marker does not point anywhere"); \ if (XMARKER (original)->buffer != current_buffer) \ set_buffer_internal (XMARKER (original)->buffer); \ - old_point = point; \ + old_point = PT; \ SET_PT (marker_position (printcharfun)); \ - start_point = point; \ + start_point = PT; \ printcharfun = Qnil;} \ if (NILP (printcharfun)) \ { \ @@ -191,10 +191,10 @@ glyph_to_str_cpy (glyphs, str) insert (print_buffer, print_buffer_pos); \ if (print_buffer) free (print_buffer); \ if (MARKERP (original)) \ - Fset_marker (original, make_number (point), Qnil); \ + Fset_marker (original, make_number (PT), Qnil); \ if (old_point >= 0) \ SET_PT (old_point + (old_point >= start_point \ - ? point - start_point : 0)); \ + ? PT - start_point : 0)); \ if (old != current_buffer) \ set_buffer_internal (old) diff --git a/src/process.c b/src/process.c index af82f560860..eac1f839f99 100644 --- a/src/process.c +++ b/src/process.c @@ -2554,7 +2554,7 @@ read_process_output (proc, channel) odeactivate = Vdeactivate_mark; Fset_buffer (p->buffer); - opoint = point; + opoint = PT; old_read_only = current_buffer->read_only; XSETFASTINT (old_begv, BEGV); XSETFASTINT (old_zv, ZV); @@ -2571,24 +2571,24 @@ read_process_output (proc, channel) /* If the output marker is outside of the visible region, save the restriction and widen. */ - if (! (BEGV <= point && point <= ZV)) + if (! (BEGV <= PT && PT <= ZV)) Fwiden (); /* Make sure opoint floats ahead of any new text, just as point would. */ - if (point <= opoint) + if (PT <= opoint) opoint += nchars; /* Insert after old_begv, but before old_zv. */ - if (point < XFASTINT (old_begv)) + if (PT < XFASTINT (old_begv)) XSETFASTINT (old_begv, XFASTINT (old_begv) + nchars); - if (point <= XFASTINT (old_zv)) + if (PT <= XFASTINT (old_zv)) XSETFASTINT (old_zv, XFASTINT (old_zv) + nchars); /* Insert before markers in case we are inserting where the buffer's mark is, and the user's next command is Meta-y. */ insert_before_markers (chars, nchars); - Fset_marker (p->mark, make_number (point), p->buffer); + Fset_marker (p->mark, make_number (PT), p->buffer); update_mode_lines++; @@ -3620,7 +3620,7 @@ status_notify () if (NILP (XBUFFER (buffer)->name)) continue; Fset_buffer (buffer); - opoint = point; + opoint = PT; /* Insert new output into buffer at the current end-of-output marker, thus preserving logical ordering of input and output. */ @@ -3628,7 +3628,7 @@ status_notify () SET_PT (marker_position (p->mark)); else SET_PT (ZV); - if (point <= opoint) + if (PT <= opoint) opoint += XSTRING (msg)->size + XSTRING (p->name)->size + 10; tem = current_buffer->read_only; @@ -3638,7 +3638,7 @@ status_notify () insert_string (" "); Finsert (1, &msg); current_buffer->read_only = tem; - Fset_marker (p->mark, make_number (point), p->buffer); + Fset_marker (p->mark, make_number (PT), p->buffer); SET_PT (opoint); set_buffer_internal (old); diff --git a/src/search.c b/src/search.c index 53187c2c485..bfc5add20d7 100644 --- a/src/search.c +++ b/src/search.c @@ -238,7 +238,7 @@ looking_at_1 (string, posix) } i = re_match_2 (bufp, (char *) p1, s1, (char *) p2, s2, - point - BEGV, &search_regs, + PT - BEGV, &search_regs, ZV - BEGV); if (i == -2) matcher_overflow (); @@ -762,7 +762,7 @@ skip_chars (forwardp, syntaxp, string, lim) fastmap[i] ^= 1; { - int start_point = point; + int start_point = PT; immediate_quit = 1; if (syntaxp) @@ -770,33 +770,33 @@ skip_chars (forwardp, syntaxp, string, lim) if (forwardp) { - while (point < XINT (lim) - && fastmap[(unsigned char) syntax_code_spec[(int) SYNTAX (FETCH_CHAR (point))]]) - SET_PT (point + 1); + while (PT < XINT (lim) + && fastmap[(unsigned char) syntax_code_spec[(int) SYNTAX (FETCH_CHAR (PT))]]) + SET_PT (PT + 1); } else { - while (point > XINT (lim) - && fastmap[(unsigned char) syntax_code_spec[(int) SYNTAX (FETCH_CHAR (point - 1))]]) - SET_PT (point - 1); + while (PT > XINT (lim) + && fastmap[(unsigned char) syntax_code_spec[(int) SYNTAX (FETCH_CHAR (PT - 1))]]) + SET_PT (PT - 1); } } else { if (forwardp) { - while (point < XINT (lim) && fastmap[FETCH_CHAR (point)]) - SET_PT (point + 1); + while (PT < XINT (lim) && fastmap[FETCH_CHAR (PT)]) + SET_PT (PT + 1); } else { - while (point > XINT (lim) && fastmap[FETCH_CHAR (point - 1)]) - SET_PT (point - 1); + while (PT > XINT (lim) && fastmap[FETCH_CHAR (PT - 1)]) + SET_PT (PT - 1); } } immediate_quit = 0; - return make_number (point - start_point); + return make_number (PT - start_point); } } @@ -826,7 +826,7 @@ search_command (string, bound, noerror, count, direction, RE, posix) { CHECK_NUMBER_COERCE_MARKER (bound, 1); lim = XINT (bound); - if (n > 0 ? lim < point : lim > point) + if (n > 0 ? lim < PT : lim > PT) error ("Invalid search bound (wrong side of point)"); if (lim > ZV) lim = ZV; @@ -834,7 +834,7 @@ search_command (string, bound, noerror, count, direction, RE, posix) lim = BEGV; } - np = search_buffer (string, point, lim, n, RE, + np = search_buffer (string, PT, lim, n, RE, (!NILP (current_buffer->case_fold_search) ? XCHAR_TABLE (current_buffer->case_canon_table)->contents : 0), @@ -1745,7 +1745,7 @@ since only regular expressions have distinguished subexpressions.") for (pos = 0; pos < XSTRING (newtext)->size; pos++) { - int offset = point - search_regs.start[sub]; + int offset = PT - search_regs.start[sub]; c = XSTRING (newtext)->data[pos]; if (c == '\\') @@ -1773,13 +1773,13 @@ since only regular expressions have distinguished subexpressions.") UNGCPRO; } - inslen = point - (search_regs.start[sub]); + inslen = PT - (search_regs.start[sub]); del_range (search_regs.start[sub] + inslen, search_regs.end[sub] + inslen); if (case_action == all_caps) - Fupcase_region (make_number (point - inslen), make_number (point)); + Fupcase_region (make_number (PT - inslen), make_number (PT)); else if (case_action == cap_initial) - Fupcase_initials_region (make_number (point - inslen), make_number (point)); + Fupcase_initials_region (make_number (PT - inslen), make_number (PT)); return Qnil; } diff --git a/src/syntax.c b/src/syntax.c index 8c08aa56a10..22339930b2b 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -639,7 +639,7 @@ and nil is returned.") int val; CHECK_NUMBER (count, 0); - if (!(val = scan_words (point, XINT (count)))) + if (!(val = scan_words (PT, XINT (count)))) { SET_PT (XINT (count) > 0 ? ZV : BEGV); return Qnil; @@ -1401,7 +1401,7 @@ This includes chars with \"quote\" or \"prefix\" syntax (' or p).") () { int beg = BEGV; - int pos = point; + int pos = PT; while (pos > beg && !char_quoted (pos - 1) && (SYNTAX (FETCH_CHAR (pos - 1)) == Squote diff --git a/src/undo.c b/src/undo.c index d2cc1d2dcd4..9a139456927 100644 --- a/src/undo.c +++ b/src/undo.c @@ -108,7 +108,7 @@ record_delete (beg, length) if (MODIFF <= SAVE_MODIFF) record_first_change (); - if (point == beg + length) + if (PT == beg + length) XSETINT (sbeg, -beg); else XSETFASTINT (sbeg, beg); diff --git a/src/window.c b/src/window.c index c27991154ba..19fd3802e82 100644 --- a/src/window.c +++ b/src/window.c @@ -2935,7 +2935,7 @@ redraws with point in the center of the current window.") if (XINT (arg) < 0) XSETINT (arg, XINT (arg) + ht); - pos = *vmotion (point, - XINT (arg), w); + pos = *vmotion (PT, - XINT (arg), w); Fset_marker (w->start, make_number (pos.bufpos), w->buffer); w->start_at_line_beg = ((pos.bufpos == BEGV -- 2.39.2