From: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: text_property_stickiness
Date: Sun, 25 Jun 2006 16:59:12 -0400 [thread overview]
Message-ID: <87ac81eyu7.fsf@stupidchicken.com> (raw)
In-Reply-To: <E1FuWcO-0001dY-TN@fencepost.gnu.org> (Richard Stallman's message of "Sun, 25 Jun 2006 11:33:48 -0400")
Richard Stallman <rms@gnu.org> writes:
> 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.
I see. I've checked the higher-level functions, and here are the
results:
text_property_stickiness is called by:
* get_pos_property, which is called by:
** find_field, which is called by:
Fdelete_field
Ffield_string
Ffield_string_no_properties
Ffield_beginning
Ffield_end
** Fconstrain_to_field, which is called by:
Fline_beginning_position
Fline_end_position
** get_local_map, for only valid positions.
** adjust_point_for_property, for only valid positions.
* adjust_for_invis_intang, which is called by:
** set_point_both, for only valid values of pos.
So the only thing we have to worry about are a bunch of lisp-visible
functions, Fdelete_field and so forth. I think it is acceptable for
us to handle this situation by the signalling of an args_out_of_range
error, which, as you pointed out, already happens with the call to
Fget_text_property in text_property_stickiness. So maybe all that we
need to do is to add a comment to the code. (Or should we initialize
prev_pos to stop the checker from complaining?)
*** emacs/src/textprop.c.~1.147.~ 2006-05-22 20:28:23.000000000 -0400
--- emacs/src/textprop.c 2006-06-25 16:50:17.000000000 -0400
***************
*** 1789,1794 ****
--- 1789,1796 ----
}
/* Consider following character. */
+ /* If pos is outside the accessible range of the buffer, this
+ signals an args_out_of_range error. */
front_sticky = Fget_text_property (pos, Qfront_sticky, buffer);
if (EQ (front_sticky, Qt)
next prev parent reply other threads:[~2006-06-25 20:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-24 20:27 text_property_stickiness Chong Yidong
2006-06-25 15:33 ` text_property_stickiness Richard Stallman
2006-06-25 20:59 ` Chong Yidong [this message]
2006-06-26 4:33 ` text_property_stickiness Miles Bader
2006-06-26 17:50 ` text_property_stickiness Chong Yidong
2006-06-27 2:03 ` text_property_stickiness Miles Bader
2006-06-27 16:16 ` text_property_stickiness Richard Stallman
2006-06-28 0:04 ` text_property_stickiness Chong Yidong
2006-06-29 12:59 ` text_property_stickiness Richard Stallman
2006-06-27 10:34 ` text_property_stickiness Richard Stallman
2006-06-26 11:33 ` text_property_stickiness Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ac81eyu7.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.