comparison src/editfns.c @ 5461:568ec109e73d

Check types (unless `byte-compile-delete-errors' is t), #'char<, #'char=, etc. src/ChangeLog addition: 2011-04-23 Aidan Kehoe <kehoea@parhasard.net> * editfns.c: * editfns.c (syms_of_editfns): Implement #'char= in cl-extra.el, not here, accepting more than two arguments as Common Lisp specifies. lisp/ChangeLog addition: 2011-04-23 Aidan Kehoe <kehoea@parhasard.net> * cl-extra.el (define-char-comparisons): Add type-checking when the various character-specific comparison predicates are used; don't check types if byte-compile-delete-errors is non-nil at compile-time, instead use the corresponding built-in numeric byte codes.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 23 Apr 2011 22:42:10 +0100
parents af961911bcb2
children f2881cb841b4
comparison
equal deleted inserted replaced
5460:82e220b08ace 5461:568ec109e73d
2258 return (!NILP (b->case_fold_search) 2258 return (!NILP (b->case_fold_search)
2259 ? CANONCASE (b, x1) == CANONCASE (b, x2) 2259 ? CANONCASE (b, x1) == CANONCASE (b, x2)
2260 : x1 == x2) 2260 : x1 == x2)
2261 ? Qt : Qnil; 2261 ? Qt : Qnil;
2262 } 2262 }
2263
2264 DEFUN ("char=", Fchar_Equal, 2, 2, 0, /*
2265 Return t if two characters match, case is significant.
2266 Both arguments must be characters (i.e. NOT integers).
2267 */
2268 (character1, character2))
2269 {
2270 CHECK_CHAR_COERCE_INT (character1);
2271 CHECK_CHAR_COERCE_INT (character2);
2272
2273 return EQ (character1, character2) ? Qt : Qnil;
2274 }
2275 2263
2276 #if 0 /* Undebugged FSFmacs code */ 2264 #if 0 /* Undebugged FSFmacs code */
2277 /* Transpose the markers in two regions of the current buffer, and 2265 /* Transpose the markers in two regions of the current buffer, and
2278 adjust the ones between them if necessary (i.e.: if the regions 2266 adjust the ones between them if necessary (i.e.: if the regions
2279 differ in size). 2267 differ in size).
2395 DEFSYMBOL (Qregion_end); 2383 DEFSYMBOL (Qregion_end);
2396 DEFSYMBOL (Qformat); 2384 DEFSYMBOL (Qformat);
2397 DEFSYMBOL (Quser_files_and_directories); 2385 DEFSYMBOL (Quser_files_and_directories);
2398 2386
2399 DEFSUBR (Fchar_equal); 2387 DEFSUBR (Fchar_equal);
2400 DEFSUBR (Fchar_Equal);
2401 DEFSUBR (Fgoto_char); 2388 DEFSUBR (Fgoto_char);
2402 DEFSUBR (Fstring_to_char); 2389 DEFSUBR (Fstring_to_char);
2403 DEFSUBR (Fchar_to_string); 2390 DEFSUBR (Fchar_to_string);
2404 DEFSUBR (Fbuffer_substring); 2391 DEFSUBR (Fbuffer_substring);
2405 DEFSUBR (Fbuffer_substring_no_properties); 2392 DEFSUBR (Fbuffer_substring_no_properties);