From xemacs-m  Thu Sep 25 00:03:19 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id AAA13809
	for <xemacs-beta@xemacs.org>; Thu, 25 Sep 1997 00:03:18 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.7/8.8.7) id WAA25895;
	Wed, 24 Sep 1997 22:09:27 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: thing.elc (b23)
References: <lb4t7bz2ff.fsf@orion.kurims.kyoto-u.ac.jp> <199709240623.XAA09601@xemacs.eng.sun.com> <lb67rqcedd.fsf@orion.kurims.kyoto-u.ac.jp> <m2iuvqhxw1.fsf@altair.xemacs.org>
X-Face: (:YAD@JS'&Kz'M}n7eX7gEvPR6U1mJ-kt;asEc2qAv;h{Yw7ckz<7+X_SYeTNAaPui:e~x$
 ,A=gkt*>UPL/}\a/#C~v2%ETiAY_sx;xve0yL??JWTtX_-NUzXyP38UdW#cmN1\4(X!c3m#%IbtB-3
 Z-!xpZi!`E.s{(;aP=b11"!3wQu]1j@^V|;n=B|{l<bZV1.AI`zWV%kPCnUhcgEe\(}/_kNd6,*3ZJ
 Q3o<YQ3^u;7jS=:p0--u3msQO
X-Attribution: sb
From: SL Baur <steve@xemacs.org>
In-Reply-To: SL Baur's message of "24 Sep 1997 20:31:58 -0700"
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 24 Sep 1997 22:09:26 -0700
Message-ID: <m2zpp2ou7t.fsf@altair.xemacs.org>
Lines: 79
X-Mailer: Quassia Gnus v0.10/XEmacs 20.3(beta24) - "Ljubljana"

SL Baur <steve@xemacs.org> writes:

> Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp> writes:
>> I still don't understand why the old "thing.el" doesn't give an error,
>> while its .elc file does.  This looks like a Elisp bug, or am I
>> missing something?

You have found an Elisp bug, good deduction. :-)


Please back out Martin's patch to thing.el and try this fix.

1997-09-24  SL Baur  <steve@altair.xemacs.org>

	* emacsfns.h: Declare Fchar_syntax.

	* bytecode.c (Fbyte_code): Call Fchar_syntax for the Bchar_syntax
	bytecode.

	* syntax.c (Fchar_syntax): convert nil input to \000 for
	compatibility.

Index: src/emacsfns.h
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/src/emacsfns.h,v
retrieving revision 1.21
diff -u -r1.21 emacsfns.h
--- emacsfns.h	1997/09/17 05:19:57	1.21
+++ emacsfns.h	1997/09/25 04:08:36
@@ -1737,6 +1737,7 @@
 /* Defined in syntax.c */
 int scan_words (struct buffer *buf, int from, int count);
 Lisp_Object Fforward_word (Lisp_Object n, Lisp_Object buffer);
+Lisp_Object Fchar_syntax (Lisp_Object ch, Lisp_Object table);
 
 
 /* Defined in sysdep.c, also declared in sysdep.h.

Index: src/bytecode.c
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/src/bytecode.c,v
retrieving revision 1.6
diff -u -r1.6 bytecode.c
--- bytecode.c	1997/09/03 03:39:25	1.6
+++ bytecode.c	1997/09/25 04:37:06
@@ -972,12 +972,16 @@
 	  break;
 
 	case Bchar_syntax:
+#if 0
 	  CHECK_CHAR_COERCE_INT (TOP);
 	  TOP = make_char (syntax_code_spec
 			   [(int) SYNTAX
 			    (XCHAR_TABLE
 			     (current_buffer->mirror_syntax_table),
 			     XCHAR (TOP))]);
+#endif
+	  /*v1 = POP;*/
+	  TOP = Fchar_syntax(TOP, Qnil);
 	  break;
 
 	case Bbuffer_substring:

Index: src/syntax.c
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/src/syntax.c,v
retrieving revision 1.5
diff -u -r1.5 syntax.c
--- syntax.c	1997/09/03 03:39:51	1.5
+++ syntax.c	1997/09/25 03:21:15
@@ -274,7 +274,7 @@
 
   if (NILP(ch))
     {
-      return Qnil;
+      ch = make_char('\000');
     }
   CHECK_CHAR_COERCE_INT (ch);
   table = check_syntax_table (table, current_buffer->syntax_table);

