aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2020-01-07 11:23:11 -0800
committerPaul Eggert2020-01-07 11:29:42 -0800
commit724af7671590cd91df37f64df6be73f6dca0144d (patch)
tree075df63dcdc3653ff710ce49a5f238c165d0f0c1 /doc
parentf950b078a6f2fd011312e9471998edf6b5fb957e (diff)
downloademacs-724af7671590cd91df37f64df6be73f6dca0144d.tar.gz
emacs-724af7671590cd91df37f64df6be73f6dca0144d.zip
Fix sxhash-equal on bytecodes, markers, etc.
Problem reported by Pip Cet (Bug#38912#14). * doc/lispref/objects.texi (Equality Predicates): Document better when ‘equal’ looks inside objects. * doc/lispref/windows.texi (Window Configurations): Don’t say that ‘equal’ looks inside window configurations. * etc/NEWS: Mention the change. * src/fns.c (internal_equal): Do not look inside window configurations. (sxhash_obj): Hash markers, byte-code function objects, char-tables, and font objects consistently with Fequal. * src/window.c (compare_window_configurations): Now static. Remove last argument. Caller changed. * test/lisp/ffap-tests.el (ffap-other-window--bug-25352): Use compare-window-configurations, not ‘equal’. * test/src/fns-tests.el (test-sxhash-equal): New test.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/objects.texi8
-rw-r--r--doc/lispref/windows.texi4
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 4be2eb6918b..4242223a48e 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -2336,8 +2336,12 @@ same sequence of character codes and all these codes are in the range
2336@end group 2336@end group
2337@end example 2337@end example
2338 2338
2339However, two distinct buffers are never considered @code{equal}, even if 2339The @code{equal} function recursively compares the contents of objects
2340their textual contents are the same. 2340if they are integers, strings, markers, vectors, bool-vectors,
2341byte-code function objects, char-tables, records, or font objects.
2342Other objects are considered @code{equal} only if they are @code{eq}.
2343For example, two distinct buffers are never considered @code{equal},
2344even if their textual contents are the same.
2341@end defun 2345@end defun
2342 2346
2343 For @code{equal}, equality is defined recursively; for example, given 2347 For @code{equal}, equality is defined recursively; for example, given
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index c9301c9d186..d0791d40196 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -5915,10 +5915,6 @@ This function compares two window configurations as regards the
5915structure of windows, but ignores the values of point and the 5915structure of windows, but ignores the values of point and the
5916saved scrolling positions---it can return @code{t} even if those 5916saved scrolling positions---it can return @code{t} even if those
5917aspects differ. 5917aspects differ.
5918
5919The function @code{equal} can also compare two window configurations; it
5920regards configurations as unequal if they differ in any respect, even a
5921saved point.
5922@end defun 5918@end defun
5923 5919
5924@defun window-configuration-frame config 5920@defun window-configuration-frame config