changeset 11066:2a3d961889b4

(invisible_p, invisible_ellipsis_p): Handle list as invisible property value.
author Richard M. Stallman <rms@gnu.org>
date Sun, 19 Mar 1995 18:48:15 +0000
parents da9137aa151f
children a73305d0a6b4
files src/xdisp.c
diffstat 1 files changed, 41 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Sat Mar 18 23:08:02 1995 +0000
+++ b/src/xdisp.c	Sun Mar 19 18:48:15 1995 +0000
@@ -3838,6 +3838,8 @@
 /* This is like a combination of memq and assq.
    Return 1 if PROPVAL appears as an element of LIST
    or as the car of an element of LIST.
+   If PROPVAL is a list, compare each element against LIST
+   in that way, and return 1 if any element of PROPVAL is found in LIST.
    Otherwise return 0.
    This function cannot quit.  */
 
@@ -3846,21 +3848,40 @@
      register Lisp_Object propval;
      Lisp_Object list;
 {
-  register Lisp_Object tail;
-  for (tail = list; CONSP (tail); tail = Fcdr (tail))
+  register Lisp_Object tail, proptail;
+  for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr)
     {
       register Lisp_Object tem;
-      tem = Fcar (tail);
+      tem = XCONS (tail)->car;
       if (EQ (propval, tem))
 	return 1;
       if (CONSP (tem) && EQ (propval, XCONS (tem)->car))
 	return 1;
     }
+  if (CONSP (propval))
+    for (proptail = propval; CONSP (proptail);
+	 proptail = XCONS (proptail)->cdr)
+      {
+	Lisp_Object propelt;
+	propelt = XCONS (proptail)->car;
+	for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr)
+	  {
+	    register Lisp_Object tem;
+	    tem = XCONS (tail)->car;
+	    if (EQ (propelt, tem))
+	      return 1;
+	    if (CONSP (tem) && EQ (propelt, XCONS (tem)->car))
+	      return 1;
+	  }
+      }
   return 0;
 }
 
 /* Return 1 if PROPVAL appears as the car of an element of LIST
    and the cdr of that element is non-nil.
+   If PROPVAL is a list, check each element of PROPVAL in that way,
+   and the first time some element is found,
+   return 1 if the cdr of that element is non-nil.
    Otherwise return 0.
    This function cannot quit.  */
 
@@ -3869,14 +3890,28 @@
      register Lisp_Object propval;
      Lisp_Object list;
 {
-  register Lisp_Object tail;
-  for (tail = list; CONSP (tail); tail = Fcdr (tail))
+  register Lisp_Object tail, proptail;
+  for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr)
     {
       register Lisp_Object tem;
-      tem = Fcar (tail);
+      tem = XCONS (tail)->car;
       if (CONSP (tem) && EQ (propval, XCONS (tem)->car))
 	return ! NILP (XCONS (tem)->cdr);
     }
+  if (CONSP (propval))
+    for (proptail = propval; CONSP (proptail);
+	 proptail = XCONS (proptail)->cdr)
+      {
+	Lisp_Object propelt;
+	propelt = XCONS (proptail)->car;
+	for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr)
+	  {
+	    register Lisp_Object tem;
+	    tem = XCONS (tail)->car;
+	    if (CONSP (tem) && EQ (propelt, XCONS (tem)->car))
+	      return ! NILP (XCONS (tem)->cdr);
+	  }
+      }
   return 0;
 }