aboutsummaryrefslogtreecommitdiffstats
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2007-08-27 09:21:49 +0000
committerMiles Bader <[email protected]>2007-08-27 09:21:49 +0000
commit62fb5e25f4a4c7da6fe6a06569b22a27998ae6bf (patch)
tree9e21647ad3ab0f43ea02d372adc4cfa9947e5309 /src/xdisp.c
parent9005667b3381a785759a996e00fb1acfd126eecc (diff)
parent83cc8d356afe3bfd68da74b822549e02047ed041 (diff)
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 857-862) - Update from CVS - Merge from emacs--rel--22 - Update from CVS: lisp/emacs-lisp/avl-tree.el: New file. * emacs--rel--22 (patch 97-100) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 246-247) - Update from CVS Revision: [email protected]/emacs--multi-tty--0--patch-38
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 9d786f286c..d16e13ef72 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18447,6 +18447,27 @@ invisible_p (propval, list)
return 0;
}
+DEFUN ("invisible-p", Finvisible_p, Sinvisible_p, 1, 1, 0,
+ doc: /* Non-nil if the property makes the text invisible.
+POS-OR-PROP can be a marker or number, in which case it is taken to be
+a position in the current buffer and the value of the `invisible' property
+is checked; or it can be some other value, which is then presumed to be the
+value of the `invisible' property of the text of interest.
+The non-nil value returned can be t for truly invisible text or something
+else if the text is replaced by an ellipsis. */)
+ (pos_or_prop)
+ Lisp_Object pos_or_prop;
+{
+ Lisp_Object prop
+ = (NATNUMP (pos_or_prop) || MARKERP (pos_or_prop)
+ ? Fget_char_property (pos_or_prop, Qinvisible, Qnil)
+ : pos_or_prop);
+ int invis = TEXT_PROP_MEANS_INVISIBLE (prop);
+ return (invis == 0 ? Qnil
+ : invis == 1 ? Qt
+ : make_number (invis));
+}
+
/* Calculate a width or height in pixels from a specification using
the following elements:
@@ -23822,6 +23843,7 @@ syms_of_xdisp ()
defsubr (&Slookup_image_map);
#endif
defsubr (&Sformat_mode_line);
+ defsubr (&Sinvisible_p);
staticpro (&Qmenu_bar_update_hook);
Qmenu_bar_update_hook = intern ("menu-bar-update-hook");