You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
#include <config.h>
p = SDATA (string);
code = (enum syntaxcode) syntax_spec_code[*p++];
if (((int) code & 0377) == 0377)
- error ("invalid syntax description letter: %c", p[-1]);
+ error ("Invalid syntax description letter: %c", p[-1]);
if (code == Sinherit)
return Qnil;
(arg)
Lisp_Object arg;
{
+ Lisp_Object tmp;
int orig_val, val;
if (NILP (arg))
val = XINT (arg) > 0 ? ZV : BEGV;
/* Avoid jumping out of an input field. */
- val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT),
- Qt, Qnil, Qnil));
+ tmp = Fconstrain_to_field (make_number (val), make_number (PT),
+ Qt, Qnil, Qnil);
+ val = XFASTINT (tmp);
SET_PT (val);
return val == orig_val ? Qt : Qnil;
if (negate)
break;
else
- goto fwd_ok;
+ goto fwd_unibyte_ok;
}
if (!fastmap[*p])
break;
-
+ fwd_unibyte_ok:
p++, pos++;
}
}
if (negate)
break;
else
- goto fwd_ok;
+ goto back_unibyte_ok;
}
if (!fastmap[p[-1]])
break;
-
+ back_unibyte_ok:
p--, pos--;
}
}
INC_FROM;
code = prev_from_syntax & 0xff;
- if (code == Scomment)
+ if (from < end
+ && SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)
+ && (c1 = FETCH_CHAR (from_byte),
+ SYNTAX_COMSTART_SECOND (c1)))
+ /* Duplicate code to avoid a complex if-expression
+ which causes trouble for the SGI compiler. */
{
- state.comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax);
- state.incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ?
- 1 : -1);
+ /* Record the comment style we have entered so that only
+ the comment-end sequence of the same style actually
+ terminates the comment section. */
+ state.comstyle = SYNTAX_COMMENT_STYLE (c1);
+ comnested = SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax);
+ comnested = comnested || SYNTAX_COMMENT_NESTED (c1);
+ state.incomment = comnested ? 1 : -1;
state.comstr_start = prev_from;
+ INC_FROM;
+ code = Scomment;
}
else if (code == Scomment_fence)
{
state.comstr_start = prev_from;
code = Scomment;
}
- else if (from < end)
- if (SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax))
- if (c1 = FETCH_CHAR (from_byte),
- SYNTAX_COMSTART_SECOND (c1))
- /* Duplicate code to avoid a complex if-expression
- which causes trouble for the SGI compiler. */
- {
- /* Record the comment style we have entered so that only
- the comment-end sequence of the same style actually
- terminates the comment section. */
- state.comstyle = SYNTAX_COMMENT_STYLE (c1);
- comnested = SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax);
- comnested = comnested || SYNTAX_COMMENT_NESTED (c1);
- state.incomment = comnested ? 1 : -1;
- state.comstr_start = prev_from;
- INC_FROM;
- code = Scomment;
- }
+ else if (code == Scomment)
+ {
+ state.comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax);
+ state.incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ?
+ 1 : -1);
+ state.comstr_start = prev_from;
+ }
if (SYNTAX_FLAGS_PREFIX (prev_from_syntax))
continue;
staticpro (&Vsyntax_code_object);
+ staticpro (&gl_state.object);
+ staticpro (&gl_state.global_code);
+ staticpro (&gl_state.current_syntax_table);
+ staticpro (&gl_state.old_prop);
+
+ /* Defined in regex.c */
+ staticpro (&re_match_object);
+
Qscan_error = intern ("scan-error");
staticpro (&Qscan_error);
Fput (Qscan_error, Qerror_conditions,