From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: text_property_stickiness Date: Sun, 25 Jun 2006 11:33:48 -0400 Message-ID: References: <87r71ee1uq.fsf@stupidchicken.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1151249730 3609 80.91.229.2 (25 Jun 2006 15:35:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2006 15:35:30 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 25 17:35:27 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FuWdk-0000Zi-H9 for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2006 17:35:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FuWdj-0002ca-UR for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2006 11:35:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FuWcQ-0001Sg-Rs for emacs-devel@gnu.org; Sun, 25 Jun 2006 11:33:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FuWcQ-0001Rj-6r for emacs-devel@gnu.org; Sun, 25 Jun 2006 11:33:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FuWcP-0001Qz-SY for emacs-devel@gnu.org; Sun, 25 Jun 2006 11:33:49 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FuWo5-0003AQ-L5 for emacs-devel@gnu.org; Sun, 25 Jun 2006 11:45:53 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1FuWcO-0001dY-TN; Sun, 25 Jun 2006 11:33:48 -0400 Original-To: Chong Yidong In-reply-to: <87r71ee1uq.fsf@stupidchicken.com> (message from Chong Yidong on Sat, 24 Jun 2006 16:27:09 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56170 Archived-At: *** emacs/src/textprop.c.~1.147.~ 2006-05-17 13:33:46.000000000 -0400 --- emacs/src/textprop.c 2006-06-24 16:24:46.000000000 -0400 *************** *** 1787,1792 **** --- 1787,1794 ---- /* PROP is rear-non-sticky. */ is_rear_sticky = 0; } + else + return 0; This would make text_property_stickiness return 0 when POS is before BEGV. Does that give correct results in calls from find_field? I doubt it. Meanwhile, if POS is after ZV, Fget_text_property will get an error in the following code, right? /* Consider following character. */ front_sticky = Fget_text_property (pos, Qfront_sticky, buffer); This problem really is tricky, for the reasons I explained. It could be that we need to make sure find_field is never called for positions outside BEGV..ZV. That may require changes in callers at higher level, and changes in the specs of the field functions.