diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-01-20 06:05:53 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-01-20 06:05:53 +0000 |
commit | 1b5d98bba7912f02cc873fcc4bb76be382a0aced (patch) | |
tree | 844ff660ba64d7b02aafeb2e886a72790467ecbd /src/editfns.c | |
parent | 97d26a9743d89e18f30624ec7fb7fadcf5b45c77 (diff) | |
download | emacs-1b5d98bba7912f02cc873fcc4bb76be382a0aced.tar.gz |
(Fchar_equal): Fix case-conversion code.
Diffstat (limited to 'src/editfns.c')
-rw-r--r-- | src/editfns.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c index 7f47d596b13..fa6881c35b3 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2424,14 +2424,21 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer.") (c1, c2) register Lisp_Object c1, c2; { + int i1, i2; CHECK_NUMBER (c1, 0); CHECK_NUMBER (c2, 1); - if (XINT (c1) == XINT (c2) - && (NILP (current_buffer->case_fold_search) - || DOWNCASE (XFASTINT (c1)) == DOWNCASE (XFASTINT (c2)))) + if (XINT (c1) == XINT (c2)) return Qt; - return Qnil; + if (NILP (current_buffer->case_fold_search)) + return Qnil; + + /* Do these in separate statements, + then compare the variables. + because of the way DOWNCASE uses temp variables. */ + i1 = DOWNCASE (XFASTINT (c1)); + i2 = DOWNCASE (XFASTINT (c2)); + return (i1 == i2 ? Qt : Qnil); } /* Transpose the markers in two regions of the current buffer, and |