From: Miles Bader Date: Fri, 19 Oct 2001 07:08:29 +0000 (+0000) Subject: (text_property_stickiness): Non-rear-non-stickiness doesn't take X-Git-Tag: ttn-vms-21-2-B4~19358 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b57c2708f0ab0155f7e27cae9d3a42408a947052;p=emacs.git (text_property_stickiness): Non-rear-non-stickiness doesn't take precedence if the affected property's value is nil. (Fencode_time): Escape a BOL paren in the doc-string. --- diff --git a/src/ChangeLog b/src/ChangeLog index 90de9550267..b125b1f149a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2001-10-19 Miles Bader + * editfns.c (text_property_stickiness): Non-rear-non-stickiness + doesn't take precedence if the affected property's value is nil. + + * editfns.c (Fencode_time): Escape a BOL paren in the doc-string. + * cmds.c (Fbeginning_of_line, Fend_of_line): Clarify interaction with fields and suggest using `forward-line' to avoid them. * editfns.c (Fline_beginning_position, Fline_end_position): diff --git a/src/editfns.c b/src/editfns.c index 661ad95d292..d0b682ff67e 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -357,17 +357,23 @@ text_property_stickiness (prop, pos) if (XINT (pos) > BEGV) /* Consider previous character. */ { - Lisp_Object prev_pos, rear_non_sticky; + Lisp_Object prev_pos = make_number (XINT (pos) - 1); - prev_pos = make_number (XINT (pos) - 1); - rear_non_sticky = Fget_text_property (prev_pos, Qrear_nonsticky, Qnil); - - if (EQ (rear_non_sticky, Qnil) - || (CONSP (rear_non_sticky) - && NILP (Fmemq (prop, rear_non_sticky)))) - /* PROP is not rear-non-sticky, and since this takes precedence over - any front-stickiness, PROP is inherited from before. */ - return -1; + if (! NILP (Fget_text_property (prev_pos, prop, Qnil))) + /* Non-rear-non-stickiness only takes precedence if the + preceding property value is non-nil. */ + { + Lisp_Object rear_non_sticky + = Fget_text_property (prev_pos, Qrear_nonsticky, Qnil); + + if (EQ (rear_non_sticky, Qnil) + || (CONSP (rear_non_sticky) + && NILP (Fmemq (prop, rear_non_sticky)))) + /* PROP is not rear-non-sticky, and since this takes + precedence over any front-stickiness, PROP is inherited + from before. */ + return -1; + } } /* Consider following character. */ @@ -1599,7 +1605,7 @@ DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0, This is the reverse operation of `decode-time', which see. ZONE defaults to the current time zone rule. This can be a string or t (as from `set-time-zone-rule'), or it can be a list -(as from `current-time-zone') or an integer (as from `decode-time') +\(as from `current-time-zone') or an integer (as from `decode-time') applied without consideration for daylight savings time. You can pass more than 7 arguments; then the first six arguments