diff lisp/cl-extra.el @ 4728:d0ea57eb3de4

Don't error if handed a string and a non-string, #'equalp. tests/ChangeLog addition: 2009-11-01 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el: Check that (equal "hi there" [hi there]) gives nil, instead of erroring; fixes a bug Ben introduced in 2002. lisp/ChangeLog addition: 2009-11-01 Aidan Kehoe <kehoea@parhasard.net> * cl-extra.el (equalp): Don't error if handed a string and a non-string.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 01 Nov 2009 15:05:46 +0000
parents b5e1d4f6b66f
children 95b04754ea8c
line wrap: on
line diff
--- a/lisp/cl-extra.el	Sun Nov 01 20:21:11 2009 +0900
+++ b/lisp/cl-extra.el	Sun Nov 01 15:05:46 2009 +0000
@@ -97,7 +97,8 @@
   (cond ((eq x y) t)
 	((stringp x)
 	 ;; XEmacs change: avoid downcase
-	 (eq t (compare-strings x nil nil y nil nil t)))
+	 (and (stringp y)
+	      (eq t (compare-strings x nil nil y nil nil t))))
 	;; XEmacs addition: compare characters
 	((characterp x)
 	 (and (characterp y)