summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 87fa6742919..0318d12913f 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -690,10 +690,11 @@ overlays are considered only if they are associated with OBJECT. */)
DEFUN ("get-char-property-and-overlay", Fget_char_property_and_overlay,
Sget_char_property_and_overlay, 2, 3, 0,
doc: /* Like `get-char-property', but with extra overlay information.
-Return a cons whose car is the return value of `get-char-property'
-with the same arguments, that is, the value of POSITION's property
-PROP in OBJECT, and whose cdr is the overlay in which the property was
+The value is a cons cell. Its car is the return value of `get-char-property'
+with the same arguments--that is, the value of POSITION's property
+PROP in OBJECT. Its cdr is the overlay in which the property was
found, or nil, if it was found as a text property or not found at all.
+
OBJECT is optional and defaults to the current buffer. OBJECT may be
a string, a buffer or a window. For strings, the cdr of the return
value is always nil, since strings do not have overlays. If OBJECT is
@@ -1787,8 +1788,12 @@ text_property_stickiness (prop, pos, buffer)
/* PROP is rear-non-sticky. */
is_rear_sticky = 0;
}
+ else
+ return 0;
/* Consider following character. */
+ /* This signals an arg-out-of-range error if pos is outside the
+ buffer's accessible range. */
front_sticky = Fget_text_property (pos, Qfront_sticky, buffer);
if (EQ (front_sticky, Qt)