Mercurial > hg > xemacs-beta
comparison lisp/cl-macs.el @ 4910:6bc1f3f6cf0d
Make canoncase visible to Lisp; use it with chars in internal_equalp.
src/ChangeLog addition:
2010-02-01 Aidan Kehoe <kehoea@parhasard.net>
* fns.c (internal_equalp):
Use bytecode_arithcompare, which takes two args, instead of
passing a stack pointer to Feqlsign.
Use CANONCASE(), not DOWNCASE(), for case-insensitive character
comparison.
Correct a comment here.
* casefiddle.c (casify_object): New operation in this function,
CASE_CANONICALIZE.
(Fcanoncase): New function, used for case-insensitive comparison.
* lisp.h:
Make Fcanoncase, bytecode_arithcompare visible here.
* bytecode.c (bytecode_arithcompare):
Make this visible to other files.
lisp/ChangeLog addition:
2010-02-01 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (equalp):
Remove special treatment for an #'equalp with a single character
constant argument, it was incorrect (it used #'downcase instead of
#'canoncase).
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 01 Feb 2010 17:57:04 +0000 |
parents | 6ef8256a020a |
children | c17c857e20bf |
comparison
equal
deleted
inserted
replaced
4909:87175eb65ff4 | 4910:6bc1f3f6cf0d |
---|---|
3410 (cond | 3410 (cond |
3411 ((member x '("" #* [])) | 3411 ((member x '("" #* [])) |
3412 ;; No need to protect against multiple evaluation here: | 3412 ;; No need to protect against multiple evaluation here: |
3413 `(and (member ,original-y '("" #* [])) t)) | 3413 `(and (member ,original-y '("" #* [])) t)) |
3414 (t form))) | 3414 (t form))) |
3415 ((unordered-check (and (characterp x) (not (cl-const-expr-p y)))) | |
3416 `(,@let-form | |
3417 (or (eq ,x ,y) | |
3418 ;; eq has a bytecode, char-equal doesn't. | |
3419 (and (characterp ,y) | |
3420 (eq (downcase ,x) (downcase ,y)))))) | |
3421 ((unordered-check (and (numberp x) (not (cl-const-expr-p y)))) | 3415 ((unordered-check (and (numberp x) (not (cl-const-expr-p y)))) |
3422 `(,@let-form | 3416 `(,@let-form |
3423 (and (numberp ,y) | 3417 (and (numberp ,y) |
3424 (= ,x ,y)))) | 3418 (= ,x ,y)))) |
3425 ((unordered-check (and (hash-table-p x) (not (cl-const-expr-p y)))) | 3419 ((unordered-check (and (hash-table-p x) (not (cl-const-expr-p y)))) |