Function: invisible-p

invisible-p is a function defined in xdisp.c.

Signature

(invisible-p POS)

Documentation

Non-nil if text properties at POS cause text there to be currently invisible.

POS should be a marker or a buffer position; the value of the invisible property at that position in the current buffer is examined. POS can also be the actual value of the invisible text or overlay property of the text of interest, in which case the value itself is examined.

The non-nil value returned can be t for currently invisible text that is entirely hidden on display, or some other non-nil, non-t value if the text is replaced by an ellipsis.

Note that whether text with invisible property is actually hidden on display may depend on buffer-invisibility-spec, which see.

View in manual

Probably introduced at or before Emacs version 22.2.

Aliases

hfy-prop-invisible-p (obsolete since 29.1)

Source Code

// Defined in /usr/src/emacs/src/xdisp.c
{
  Lisp_Object prop
    = (FIXNATP (pos) || MARKERP (pos)
       ? Fget_char_property (pos, Qinvisible, Qnil)
       : pos);
  int invis = TEXT_PROP_MEANS_INVISIBLE (prop);
  return (invis == 0 ? Qnil
	  : invis == 1 ? Qt
	  : make_fixnum (invis));
}