ptrdiff_t comment_end = from;
ptrdiff_t comment_end_byte = from_byte;
ptrdiff_t comstart_pos = 0;
- ptrdiff_t comstart_byte IF_LINT (= 0);
+ ptrdiff_t comstart_byte;
/* Place where the containing defun starts,
or 0 if we didn't come across it yet. */
ptrdiff_t defun_start = 0;
int c;
char fastmap[0400];
/* Store the ranges of non-ASCII characters. */
- int *char_ranges IF_LINT (= NULL);
+ int *char_ranges UNINIT;
int n_char_ranges = 0;
bool negate = 0;
ptrdiff_t i, i_byte;
ptrdiff_t start_point = PT;
ptrdiff_t pos = PT;
ptrdiff_t pos_byte = PT_BYTE;
- unsigned char *p = PT_ADDR, *endp, *stop;
-
- if (forwardp)
- {
- endp = (XINT (lim) == GPT) ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim));
- stop = (pos < GPT && GPT < XINT (lim)) ? GPT_ADDR : endp;
- }
- else
- {
- endp = CHAR_POS_ADDR (XINT (lim));
- stop = (pos >= GPT && GPT > XINT (lim)) ? GAP_END_ADDR : endp;
- }
+ unsigned char *p, *endp, *stop;
immediate_quit = 1;
SETUP_SYNTAX_TABLE (pos, forwardp ? 1 : -1);
+
if (forwardp)
{
- if (multibyte)
+ while (true)
{
- while (1)
+ p = BYTE_POS_ADDR (pos_byte);
+ endp = XINT (lim) == GPT ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim));
+ stop = pos < GPT && GPT < XINT (lim) ? GPT_ADDR : endp;
+
+ do
{
int nbytes;
if (p >= stop)
{
if (p >= endp)
- break;
+ goto done;
p = GAP_END_ADDR;
stop = endp;
}
- c = STRING_CHAR_AND_LENGTH (p, nbytes);
+ if (multibyte)
+ c = STRING_CHAR_AND_LENGTH (p, nbytes);
+ else
+ c = *p, nbytes = 1;
if (! fastmap[SYNTAX (c)])
- break;
+ goto done;
p += nbytes, pos++, pos_byte += nbytes;
- UPDATE_SYNTAX_TABLE_FORWARD (pos);
- }
- }
- else
- {
- while (1)
- {
- if (p >= stop)
- {
- if (p >= endp)
- break;
- p = GAP_END_ADDR;
- stop = endp;
- }
- if (! fastmap[SYNTAX (*p)])
- break;
- p++, pos++, pos_byte++;
- UPDATE_SYNTAX_TABLE_FORWARD (pos);
}
+ while (!parse_sexp_lookup_properties
+ || pos < gl_state.e_property);
+
+ update_syntax_table_forward (pos + gl_state.offset,
+ false, gl_state.object);
}
}
else
{
+ p = BYTE_POS_ADDR (pos_byte);
+ endp = CHAR_POS_ADDR (XINT (lim));
+ stop = pos >= GPT && GPT > XINT (lim) ? GAP_END_ADDR : endp;
+
if (multibyte)
{
while (1)
}
}
+ done:
SET_PT_BOTH (pos, pos_byte);
immediate_quit = 0;
DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars,
0, 0, 0,
doc: /* Move point backward over any number of chars with prefix syntax.
-This includes chars with expression prefix syntax class (') and those with
+This includes chars with expression prefix syntax class (\\=') and those with
the prefix syntax flag (p). */)
(void)
{
opoint = pos;
opoint_byte = pos_byte;
- if (pos + 1 > beg)
- DEC_BOTH (pos, pos_byte);
+ if (pos <= beg)
+ break;
+ DEC_BOTH (pos, pos_byte);
}
SET_PT_BOTH (opoint, opoint_byte);
Vfind_word_boundary_function_table = Fmake_char_table (Qnil, Qnil);
DEFVAR_BOOL ("comment-end-can-be-escaped", Vcomment_end_can_be_escaped,
- doc: /* Non-nil means an escaped ender inside a comment doesn'tend the comment. */);
+ doc: /* Non-nil means an escaped ender inside a comment doesn't end the comment. */);
Vcomment_end_can_be_escaped = 0;
DEFSYM (Qcomment_end_can_be_escaped, "comment-end-can-be-escaped");
Fmake_variable_buffer_local (Qcomment_end_can_be_escaped);