emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c,v
Date: Sat, 25 Aug 2007 20:11:11 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        07/08/25 20:11:10

Index: xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1161
retrieving revision 1.1162
diff -u -b -r1.1161 -r1.1162
--- xdisp.c     7 Aug 2007 15:55:37 -0000       1.1161
+++ xdisp.c     25 Aug 2007 20:11:09 -0000      1.1162
@@ -18435,6 +18435,27 @@
   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:
 
@@ -23806,6 +23827,7 @@
   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");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]