From xemacs-m  Fri Jun 13 12:23:07 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id MAA14016
	for <xemacs-beta@xemacs.org>; Fri, 13 Jun 1997 12:23:06 -0500 (CDT)
Received: by crystal.WonderWorks.COM 
	id QQctub18794; Fri, 13 Jun 1997 13:22:56 -0400 (EDT)
Date: Fri, 13 Jun 1997 13:22:56 -0400 (EDT)
Message-Id: <QQctub18794.199706131722@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: xemacs-beta@xemacs.org
Subject: [PATCH] 20.3-b6: symbol-near-point broken
X-Mailer: VM 6.33 under 20.3 "Moscow" XEmacs Lucid (beta6)
X-Face: /cA45WHG7jWq>(O3&Z57Y<"WsX5ddc,4c#w0F*zrV#=M
        0@~@,s;b,aMtR5Sqs"+nU.z^CSFQ9t`z2>W,S,]:[+2^
        Nbf6v4g>!&,7R4Ot4Wg{&tm=WX7P["9%a)_da48-^tGy
        ,qz]Z,Zz\{E.,]'EO+F)@$KtF&V

At some point symbol-near-point was changed to use char-before
instead preceding-char.  The use of preceding-char was OK in this
context as near as I can tell, but you can't argue with a ghost.
Anyway, char-before returns nil at point-min and char-syntax
can't handle that (it can handle 0).  This breaks anything that
calls symbol-near-point at point-min.  M-x occur is what broke
for me.

Here's a patch.  19.15 does not have this bug.

Fri Jun 13 13:20:39 1997  Kyle Jones  <kyle_jones@wonderworks.com>

	* lisp/prim/syntax.el (symbol-near-point):
	  Check for bobp and avoid (char-syntax (char-before)) if 
	  there.

--- 1.1	1997/06/13 16:57:44
+++ lisp/prim/syntax.el	1997/06/13 16:58:48
@@ -392,7 +392,7 @@
   (interactive)
   ;alg stolen from etag.el
   (save-excursion
-	(if (not (memq (char-syntax (char-before)) '(?w ?_)))
+	(if (or (bobp) (not (memq (char-syntax (char-before)) '(?w ?_))))
 	    (while (not (looking-at "\\sw\\|\\s_\\|\\'"))
 	      (forward-char 1)))
 	(while (looking-at "\\sw\\|\\s_")

