/* GNU Emacs routines to deal with syntax tables; also word and list parsing.
- Copyright (C) 1985, 1987, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1987, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of GNU Emacs.
insert_string ("\twhich means: ");
-#ifdef SWITCH_ENUM_BUG
- switch ((int) code)
-#else
- switch (code)
-#endif
+ switch (SWITCH_ENUM_CAST (code))
{
case Swhitespace:
insert_string ("whitespace"); break;
struct buffer *old = current_buffer;
set_buffer_internal (XBUFFER (Vstandard_output));
describe_vector (vector, Qnil, describe_syntax, 0, Qnil);
+ call0 (intern ("help-mode"));
set_buffer_internal (old);
return Qnil;
}
if (from == stop)
{
SET_PT (from);
+ immediate_quit = 0;
return Qnil;
}
c = FETCH_CHAR (from);
if (SYNTAX_PREFIX (c))
continue;
-#ifdef SWITCH_ENUM_BUG
- switch ((int) code)
-#else
- switch (code)
-#endif
+ switch (SWITCH_ENUM_CAST (code))
{
case Sescape:
case Scharquote:
/* This word counts as a sexp; return at end of it. */
while (from < stop)
{
-#ifdef SWITCH_ENUM_BUG
- switch ((int) SYNTAX (FETCH_CHAR (from)))
-#else
- switch (SYNTAX (FETCH_CHAR (from)))
-#endif
+ switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from))))
{
case Scharquote:
case Sescape:
{
if (from >= stop) goto lose;
if (FETCH_CHAR (from) == stringterm) break;
-#ifdef SWITCH_ENUM_BUG
- switch ((int) SYNTAX (FETCH_CHAR (from)))
-#else
- switch (SYNTAX (FETCH_CHAR (from)))
-#endif
+ switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from))))
{
case Scharquote:
case Sescape:
if (SYNTAX_PREFIX (c))
continue;
-#ifdef SWITCH_ENUM_BUG
- switch ((int) (quoted ? Sword : code))
-#else
- switch (quoted ? Sword : code)
-#endif
+ switch (SWITCH_ENUM_CAST (quoted ? Sword : code))
{
case Sword:
case Ssymbol:
if (SYNTAX_PREFIX (FETCH_CHAR (from - 1)))
continue;
-#ifdef SWITCH_ENUM_BUG
- switch ((int) code)
-#else
- switch (code)
-#endif
+ switch (SWITCH_ENUM_CAST (code))
{
case Sescape:
case Scharquote:
symstarted:
while (from < end)
{
-#ifdef SWITCH_ENUM_BUG
- switch ((int) SYNTAX (FETCH_CHAR (from)))
-#else
- switch (SYNTAX (FETCH_CHAR (from)))
-#endif
+ switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from))))
{
case Scharquote:
case Sescape:
curlevel->prev = curlevel->last;
break;
+ startincomment:
+ if (commentstop)
+ goto done;
+ if (from != BEGV)
+ {
+ /* Enter the loop in the middle so that we find
+ a 2-char comment ender if we start in the middle of it. */
+ prev = FETCH_CHAR (from - 1);
+ goto startincomment_1;
+ }
+ /* At beginning of buffer, enter the loop the ordinary way. */
+
case Scomment:
state.incomment = 1;
- startincomment:
if (commentstop)
goto done;
while (1)
encountered. */
break;
from++;
+ startincomment_1:
if (from < end && SYNTAX_COMEND_FIRST (prev)
&& SYNTAX_COMEND_SECOND (FETCH_CHAR (from))
&& SYNTAX_COMMENT_STYLE (prev) == state.comstyle)
{
if (from >= end) goto done;
if (FETCH_CHAR (from) == state.instring) break;
-#ifdef SWITCH_ENUM_BUG
- switch ((int) SYNTAX (FETCH_CHAR (from)))
-#else
- switch (SYNTAX (FETCH_CHAR (from)))
-#endif
+ switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from))))
{
case Scharquote:
case Sescape: