summaryrefslogtreecommitdiff
path: root/src/fns.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-04 21:07:21 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-04 21:07:21 +0000
commit3215a8e46ecb06bdfafa81a14225e7c32c3b1741 (patch)
tree8f1cbbc42b6688dafb315acefc252e9b2dfb6de2 /src/fns.c
parent5fc587a8d3e8c1d8bcd3f1c3cc2ee71cf3c01121 (diff)
downloademacs-3215a8e46ecb06bdfafa81a14225e7c32c3b1741.tar.gz
(internal_equal): Call compare_string_intervals.
(Fstring_equal): Doc fix.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fns.c b/src/fns.c
index c08d8361147..e9fc6d1048d 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -127,7 +127,7 @@ A byte-code function object is also allowed.")
DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0,
"T if two strings have identical contents.\n\
-Case is significant.\n\
+Case is significant, but text properties are ignored.\n\
Symbols are also allowed; their print names are used instead.")
(s1, s2)
register Lisp_Object s1, s2;
@@ -930,6 +930,13 @@ internal_equal (o1, o2, depth)
return 0;
if (bcmp (XSTRING (o1)->data, XSTRING (o2)->data, XSTRING (o1)->size))
return 0;
+#ifdef USE_TEXT_PROPERTIES
+ /* If the strings have intervals, verify they match;
+ if not, they are unequal. */
+ if ((XSTRING (o1)->intervals != 0 || XSTRING (o2)->intervals != 0)
+ && ! compare_string_intervals (o1, o2))
+ return 0;
+#endif
return 1;
}
return 0;