Make cl-equalp a bit more efficient at comparing strings
* lisp/emacs-lisp/cl-extra.el (cl-equalp): Use compare-strings with the IGNORE-CASE argument, rather than creating downcased copies of the strings to be compared.
This commit is contained in:
parent
3758ff0f3a
commit
402b175f35
1 changed files with 1 additions and 2 deletions
|
@ -72,8 +72,7 @@ strings case-insensitively."
|
|||
(cond ((eq x y) t)
|
||||
((stringp x)
|
||||
(and (stringp y) (= (length x) (length y))
|
||||
(or (string-equal x y)
|
||||
(string-equal (downcase x) (downcase y))))) ;Lazy but simple!
|
||||
(eq (compare-strings x nil nil y nil nil t) t)))
|
||||
((numberp x)
|
||||
(and (numberp y) (= x y)))
|
||||
((consp x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue