Mercurial > emacs
comparison src/editfns.c @ 20688:16c458803c32
(Fchar_equal): Fix case-conversion code.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 20 Jan 1998 06:05:53 +0000 |
parents | 9331e7e88cf5 |
children | cdbe4824e7f1 |
comparison
equal
deleted
inserted
replaced
20687:cd31a4ab72de | 20688:16c458803c32 |
---|---|
2422 Both arguments must be characters (i.e. integers).\n\ | 2422 Both arguments must be characters (i.e. integers).\n\ |
2423 Case is ignored if `case-fold-search' is non-nil in the current buffer.") | 2423 Case is ignored if `case-fold-search' is non-nil in the current buffer.") |
2424 (c1, c2) | 2424 (c1, c2) |
2425 register Lisp_Object c1, c2; | 2425 register Lisp_Object c1, c2; |
2426 { | 2426 { |
2427 int i1, i2; | |
2427 CHECK_NUMBER (c1, 0); | 2428 CHECK_NUMBER (c1, 0); |
2428 CHECK_NUMBER (c2, 1); | 2429 CHECK_NUMBER (c2, 1); |
2429 | 2430 |
2430 if (XINT (c1) == XINT (c2) | 2431 if (XINT (c1) == XINT (c2)) |
2431 && (NILP (current_buffer->case_fold_search) | |
2432 || DOWNCASE (XFASTINT (c1)) == DOWNCASE (XFASTINT (c2)))) | |
2433 return Qt; | 2432 return Qt; |
2434 return Qnil; | 2433 if (NILP (current_buffer->case_fold_search)) |
2434 return Qnil; | |
2435 | |
2436 /* Do these in separate statements, | |
2437 then compare the variables. | |
2438 because of the way DOWNCASE uses temp variables. */ | |
2439 i1 = DOWNCASE (XFASTINT (c1)); | |
2440 i2 = DOWNCASE (XFASTINT (c2)); | |
2441 return (i1 == i2 ? Qt : Qnil); | |
2435 } | 2442 } |
2436 | 2443 |
2437 /* Transpose the markers in two regions of the current buffer, and | 2444 /* Transpose the markers in two regions of the current buffer, and |
2438 adjust the ones between them if necessary (i.e.: if the regions | 2445 adjust the ones between them if necessary (i.e.: if the regions |
2439 differ in size). | 2446 differ in size). |