projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3758ff0
)
Make cl-equalp a bit more efficient at comparing strings
author
Noam Postavsky
<npostavs@gmail.com>
Fri, 13 Mar 2020 01:07:56 +0000
(21:07 -0400)
committer
Noam Postavsky
<npostavs@gmail.com>
Fri, 13 Mar 2020 01:07:56 +0000
(21:07 -0400)
* 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.
lisp/emacs-lisp/cl-extra.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/cl-extra.el
b/lisp/emacs-lisp/cl-extra.el
index e9bfe8df5f2f63833534a68e28c3c0290995d166..323bbbbf9475dee26eaef767bb04f560ed86d323 100644
(file)
--- a/
lisp/emacs-lisp/cl-extra.el
+++ b/
lisp/emacs-lisp/cl-extra.el
@@
-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)