Mercurial > emacs
comparison src/editfns.c @ 49443:f9f7612c767a
(format2): New function, replaces format1
but takes exactly two Lisp Objects as format args.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 25 Jan 2003 19:48:14 +0000 |
parents | 41213ea7b9d6 |
children | 3fd3c5521557 |
comparison
equal
deleted
inserted
replaced
49442:20d2231b6ee7 | 49443:f9f7612c767a |
---|---|
3646 } | 3646 } |
3647 | 3647 |
3648 return val; | 3648 return val; |
3649 } | 3649 } |
3650 | 3650 |
3651 | |
3652 /* VARARGS 1 */ | |
3653 Lisp_Object | 3651 Lisp_Object |
3654 #ifdef NO_ARG_ARRAY | 3652 format2 (string1, arg0, arg1) |
3655 format1 (string1, arg0, arg1, arg2, arg3, arg4) | |
3656 EMACS_INT arg0, arg1, arg2, arg3, arg4; | |
3657 #else | |
3658 format1 (string1) | |
3659 #endif | |
3660 char *string1; | 3653 char *string1; |
3661 { | 3654 Lisp_Object arg0, arg1; |
3662 char buf[100]; | 3655 { |
3663 #ifdef NO_ARG_ARRAY | 3656 Lisp_Object args[3]; |
3664 EMACS_INT args[5]; | 3657 int numargs; |
3665 args[0] = arg0; | 3658 args[0] = build_string (string1); |
3666 args[1] = arg1; | 3659 args[1] = arg0; |
3667 args[2] = arg2; | 3660 args[2] = arg1; |
3668 args[3] = arg3; | 3661 return Fformat (3, args); |
3669 args[4] = arg4; | |
3670 doprnt (buf, sizeof buf, string1, (char *)0, 5, (char **) args); | |
3671 #else | |
3672 doprnt (buf, sizeof buf, string1, (char *)0, 5, &string1 + 1); | |
3673 #endif | |
3674 return build_string (buf); | |
3675 } | 3662 } |
3676 | 3663 |
3677 DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0, | 3664 DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0, |
3678 doc: /* Return t if two characters match, optionally ignoring case. | 3665 doc: /* Return t if two characters match, optionally ignoring case. |
3679 Both arguments must be characters (i.e. integers). | 3666 Both arguments must be characters (i.e. integers). |