aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c22
2 files changed, 27 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5f2a7d820cd..b775844bf3b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12007-08-25 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * xdisp.c (Finvisible_p): New function.
4 (syms_of_xdisp): defsubr it.
5
12007-08-24 Juanma Barranquero <lekktu@gmail.com> 62007-08-24 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * image.c (syms_of_image) <image-library-alist, cross-disabled-images>: 8 * image.c (syms_of_image) <image-library-alist, cross-disabled-images>:
diff --git a/src/xdisp.c b/src/xdisp.c
index b1a837b799a..da33b05c4c5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -18435,6 +18435,27 @@ invisible_p (propval, list)
18435 return 0; 18435 return 0;
18436} 18436}
18437 18437
18438DEFUN ("invisible-p", Finvisible_p, Sinvisible_p, 1, 1, 0,
18439 doc: /* Non-nil if the property makes the text invisible.
18440POS-OR-PROP can be a marker or number, in which case it is taken to be
18441a position in the current buffer and the value of the `invisible' property
18442is checked; or it can be some other value, which is then presumed to be the
18443value of the `invisible' property of the text of interest.
18444The non-nil value returned can be t for truly invisible text or something
18445else if the text is replaced by an ellipsis. */)
18446 (pos_or_prop)
18447 Lisp_Object pos_or_prop;
18448{
18449 Lisp_Object prop =
18450 (NATNUMP (pos_or_prop) || MARKERP (pos_or_prop))
18451 ? Fget_char_property (pos_or_prop, Qinvisible, Qnil)
18452 : pos_or_prop;
18453 int invis = TEXT_PROP_MEANS_INVISIBLE (prop);
18454 return (invis == 0 ? Qnil
18455 : invis == 1 ? Qt
18456 : make_number (invis));
18457}
18458
18438/* Calculate a width or height in pixels from a specification using 18459/* Calculate a width or height in pixels from a specification using
18439 the following elements: 18460 the following elements:
18440 18461
@@ -23806,6 +23827,7 @@ syms_of_xdisp ()
23806 defsubr (&Slookup_image_map); 23827 defsubr (&Slookup_image_map);
23807#endif 23828#endif
23808 defsubr (&Sformat_mode_line); 23829 defsubr (&Sformat_mode_line);
23830 defsubr (&Sinvisible_p);
23809 23831
23810 staticpro (&Qmenu_bar_update_hook); 23832 staticpro (&Qmenu_bar_update_hook);
23811 Qmenu_bar_update_hook = intern ("menu-bar-update-hook"); 23833 Qmenu_bar_update_hook = intern ("menu-bar-update-hook");