SL Baur <steve(a)xemacs.org> writes in xemacs-beta(a)xemacs.org:
Andy Piper <andy(a)xemacs.org> writes in xemacs-beta(a)xemacs.org:
> At 09:46 PM 6/23/99 +0900, SL Baur wrote:
>> Maybe Andy Piper can comment on what went wrong. There is probably
>> something wrong with file-coding/no-Mule.
> Its not a file-coding problem, CHAR_ASCII_P and word_boundary_p
have been
> used unconditionally but are only defined for mule builds.
O.K.
> All non-mule builds will fail. Someone should fix this quick.
O.K. I'm looking at it.
> The temporary fix to to back up syntax.c a version to 1.7.2.2.
This patch restores the non-Mule code that was removed by the extword
patch. Patch tested with file-coding on Unix.
1999-06-24 SL Baur <steve(a)miho.m17n.org>
* syntax.c (scan_words): Restore non-Mule code.
(word_constituent_p): Restore.
Index: src/syntax.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/syntax.c,v
retrieving revision 1.7.2.3
diff -u -r1.7.2.3 syntax.c
--- src/syntax.c 1999/06/23 08:05:00 1.7.2.3
+++ src/syntax.c 1999/06/24 02:43:21
@@ -327,7 +327,7 @@
}
-
+#ifdef MULE
/* Return 1 if there is a word boundary between two word-constituent
characters C1 and C2 if they appear in this order, else return 0.
There is no word boundary between two word-constituent ASCII
@@ -337,6 +337,17 @@
&& word_boundary_p (c1, c2))
extern int word_boundary_p (Emchar c1, Emchar c2);
+#else
+static int
+word_constituent_p (struct buffer *buf, Bufpos pos,
+ struct Lisp_Char_Table *tab)
+{
+ enum syntaxcode code = SYNTAX_UNSAFE (tab, BUF_FETCH_CHAR (buf, pos));
+ return ((words_include_escapes &&
+ (code == Sescape || code == Scharquote))
+ || (code == Sword));
+}
+#endif
/* Return the position across COUNT words from FROM.
If that many words cannot be found before the end of the buffer, return 0.
@@ -347,8 +358,10 @@
{
Bufpos limit = count > 0 ? BUF_ZV (buf) : BUF_BEGV (buf);
struct Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table);
+#ifdef MULE
Emchar ch0, ch1;
enum syntaxcode code;
+#endif
while (count > 0)
{
@@ -358,28 +371,41 @@
{
if (from == limit)
return 0;
+#ifdef MULE
ch0 = BUF_FETCH_CHAR (buf, from);
code = SYNTAX_UNSAFE (mirrortab, ch0);
+#else
+ if (word_constituent_p (buf, from, mirrortab))
+ break;
+#endif
from++;
+#ifdef MULE
if (words_include_escapes
&& (code == Sescape || code == Scharquote))
break;
if (code == Sword)
break;
+#endif
}
QUIT;
- while ( from != limit )
+ while ((from != limit)
+#ifndef MULE
+ && word_constituent_p (buf, from, mirrortab)
+#endif
+ )
{
+#ifdef MULE
ch1 = BUF_FETCH_CHAR (buf, from);
code = SYNTAX_UNSAFE (mirrortab, ch1);
if (!(words_include_escapes
&& (code == Sescape || code == Scharquote)))
if (code != Sword || WORD_BOUNDARY_P (ch0, ch1))
break;
- from++;
ch0 = ch1;
+#endif
+ from++;
}
count--;
}
@@ -392,7 +418,12 @@
{
if (from == limit)
return 0;
+#ifndef MULE
+ if (word_constituent_p (buf, from - 1, mirrortab))
+ break;
+#endif
from--;
+#ifdef MULE
ch1 = BUF_FETCH_CHAR (buf, from - 1);
code = SYNTAX_UNSAFE (mirrortab, ch1);
if (words_include_escapes
@@ -400,20 +431,27 @@
break;
if (code == Sword)
break;
+#endif
}
QUIT;
- while ( from != limit )
+ while ((from != limit)
+#ifndef MULE
+ && word_constituent_p (buf, from - 1, mirrortab)
+#endif
+ )
{
+#ifdef MULE
ch0 = BUF_FETCH_CHAR (buf, from - 1);
code = SYNTAX_UNSAFE (mirrortab, ch0);
if (!(words_include_escapes
&& (code == Sescape || code == Scharquote)))
if (code != Sword || WORD_BOUNDARY_P (ch0, ch1))
break;
- from--;
ch1 = ch0;
+#endif
+ from--;
}
count++;
}
--
弱り目に祟り目