Function: previous-char-property-change

previous-char-property-change is a function defined in textprop.c.

Signature

(previous-char-property-change POSITION &optional LIMIT)

Documentation

Return the position of previous text property or overlay change.

Scans characters backward in the current buffer from POSITION till it finds a change in some text property, or the beginning or end of an overlay, and returns the position of that. If none is found, and LIMIT is nil or omitted, the function returns (point-min).

If the optional second argument LIMIT is non-nil, the function doesn't search before position LIMIT, and returns LIMIT if nothing is found before LIMIT. LIMIT is a no-op if it is less than (point-min).

Probably introduced at or before Emacs version 20.1.

Source Code

// Defined in /usr/src/emacs/src/textprop.c
{
  Lisp_Object temp;

  temp = Fprevious_overlay_change (position);
  if (! NILP (limit))
    {
      CHECK_FIXNUM_COERCE_MARKER (limit);
      if (XFIXNUM (limit) > XFIXNUM (temp))
	temp = limit;
    }
  return Fprevious_property_change (position, Qnil, temp);
}